fallback to simple vs in windows system

This commit is contained in:
binary-husky
2024-09-09 00:27:02 +08:00
parent ab32c314ab
commit 7ef39770c7
3 changed files with 12 additions and 5 deletions

View File

@@ -59,6 +59,11 @@ class SaveLoad():
def create_new_vs(self):
return GptacVectorStoreIndex.default_vector_store(embed_model=self.embed_model)
def purge(self):
import shutil
shutil.rmtree(self.checkpoint_dir, ignore_errors=True)
self.vs_index = self.create_new_vs()
class LlamaIndexRagWorker(SaveLoad):
def __init__(self, user_name, llm_kwargs, auto_load_checkpoint=True, checkpoint_dir=None) -> None: