vector indexes to be named after mongo _id

This commit is contained in:
ManishMadan2882
2024-08-11 19:33:31 +05:30
parent 3c6fd365fb
commit 1eb168be55
4 changed files with 34 additions and 51 deletions

View File

@@ -40,14 +40,7 @@ class ClassicRAG(BaseRetriever):
def _get_vectorstore(self, source):
if "active_docs" in source:
if source["active_docs"].split("/")[0] == "default":
vectorstore = ""
elif source["active_docs"].split("/")[0] == "local":
vectorstore = "indexes/" + source["active_docs"]
else:
vectorstore = "vectors/" + source["active_docs"]
if source["active_docs"] == "default":
vectorstore = ""
vectorstore = "indexes/"+source["active_docs"]
else:
vectorstore = ""
vectorstore = os.path.join("application", vectorstore)