update webui.py

This commit is contained in:
imClumsyPanda 2023-04-14 22:57:07 +08:00
parent 5c3497912c
commit 8c469fda31
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ class LocalDocQA:
vector_store = FAISS.from_documents(docs, self.embeddings)
vs_path = f"""./vector_store/{os.path.splitext(file)[0]}_FAISS_{datetime.datetime.now().strftime("%Y%m%d_%H%M%S")}"""
vector_store.save_local(vs_path)
return vs_path
return vs_path if len(docs)>0 else None
def get_knowledge_based_answer(self,
query,