mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-08 16:10:18 +08:00
fix: prompt template name error in file_chat (#2366)
This commit is contained in:
parent
fdd6eb5f6d
commit
2604c9e761
@ -132,7 +132,7 @@ async def file_chat(query: str = Body(..., description="用户输入", examples=
|
|||||||
|
|
||||||
context = "\n".join([doc.page_content for doc in docs])
|
context = "\n".join([doc.page_content for doc in docs])
|
||||||
if len(docs) == 0: ## 如果没有找到相关文档,使用Empty模板
|
if len(docs) == 0: ## 如果没有找到相关文档,使用Empty模板
|
||||||
prompt_template = get_prompt_template("knowledge_base_chat", "Empty")
|
prompt_template = get_prompt_template("knowledge_base_chat", "empty")
|
||||||
else:
|
else:
|
||||||
prompt_template = get_prompt_template("knowledge_base_chat", prompt_name)
|
prompt_template = get_prompt_template("knowledge_base_chat", prompt_name)
|
||||||
input_msg = History(role="user", content=prompt_template).to_msg_template(False)
|
input_msg = History(role="user", content=prompt_template).to_msg_template(False)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user