Merge pull request #852 from benjaminhuo/master

Fix LocalDocQA object has no attribute llm when adding docs
This commit is contained in:
glide-the 2023-07-17 21:25:17 +08:00 committed by GitHub
commit aa944f6ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ def get_vector_store(local_doc_qa, vs_id, files, sentence_size, history, one_con
filelist = [] filelist = []
if not os.path.exists(os.path.join(KB_ROOT_PATH, vs_id, "content")): if not os.path.exists(os.path.join(KB_ROOT_PATH, vs_id, "content")):
os.makedirs(os.path.join(KB_ROOT_PATH, vs_id, "content")) os.makedirs(os.path.join(KB_ROOT_PATH, vs_id, "content"))
if local_doc_qa.llm and local_doc_qa.embeddings: if local_doc_qa.llm_model_chain and local_doc_qa.embeddings:
if isinstance(files, list): if isinstance(files, list):
for file in files: for file in files:
filename = os.path.split(file.name)[-1] filename = os.path.split(file.name)[-1]