From 2604c9e761c106e53d86f48402922d3d04b9f05f Mon Sep 17 00:00:00 2001 From: liunux4odoo <41217877+liunux4odoo@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:12:33 +0800 Subject: [PATCH] fix: prompt template name error in file_chat (#2366) --- server/chat/file_chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/chat/file_chat.py b/server/chat/file_chat.py index ef4a5228..f608be0d 100644 --- a/server/chat/file_chat.py +++ b/server/chat/file_chat.py @@ -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)