working es

This commit is contained in:
Alex
2023-09-29 00:32:19 +01:00
parent c1c54f4848
commit 783e7f6939
6 changed files with 235 additions and 31 deletions

View File

@@ -8,8 +8,11 @@ class FaissStore(BaseVectorStore):
super().__init__()
self.path = path
self.docsearch = FAISS.load_local(
self.path, self._get_docsearch(settings.EMBEDDINGS_NAME, settings.EMBEDDINGS_KEY)
self.path, self._get_embeddings(settings.EMBEDDINGS_NAME, settings.EMBEDDINGS_KEY)
)
def search(self, *args, **kwargs):
return self.docsearch.similarity_search(*args, **kwargs)
def add_texts(self, *args, **kwargs):
return self.docsearch.add_texts(*args, **kwargs)