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])
|
||||
if len(docs) == 0: ## 如果没有找到相关文档,使用Empty模板
|
||||
prompt_template = get_prompt_template("knowledge_base_chat", "Empty")
|
||||
prompt_template = get_prompt_template("knowledge_base_chat", "empty")
|
||||
else:
|
||||
prompt_template = get_prompt_template("knowledge_base_chat", prompt_name)
|
||||
input_msg = History(role="user", content=prompt_template).to_msg_template(False)
|
||||
|
|
|
|||
Loading…
Reference in New Issue