mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-09 08:45:44 +08:00
Update local_doc_qa.py
This commit is contained in:
parent
21362cd94c
commit
ec677beed0
@ -117,9 +117,6 @@ class LocalDocQA:
|
||||
|
||||
问题:
|
||||
{question}"""
|
||||
if vs_path is None or vs_path =="":# or (not os.path.exists(vs_path))
|
||||
result = self.llm.chat(query)
|
||||
else:
|
||||
prompt = PromptTemplate(
|
||||
template=prompt_template,
|
||||
input_variables=["context", "question"]
|
||||
@ -136,7 +133,7 @@ class LocalDocQA:
|
||||
)
|
||||
|
||||
knowledge_chain.return_source_documents = True
|
||||
|
||||
result = knowledge_chain({"query": query})
|
||||
|
||||
self.llm.history[-1][0] = query
|
||||
return result, self.llm.history
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user