From ed449686fedff974dab551b3acd487a544a6b08c Mon Sep 17 00:00:00 2001 From: martsforever Date: Mon, 24 Nov 2025 19:30:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E7=9F=A5=E8=AF=86?= =?UTF-8?q?=E5=BA=93=E6=A3=80=E7=B4=A2=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/add_knowledge_route.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controller/add_knowledge_route.py b/app/controller/add_knowledge_route.py index 759ae21..3e5fcc4 100644 --- a/app/controller/add_knowledge_route.py +++ b/app/controller/add_knowledge_route.py @@ -34,7 +34,7 @@ def add_knowledge_route(app): yield f'data: {json.dumps({"type": "retrieve", "data": json.dumps(search_response.model_dump())}, ensure_ascii=False)}\n\n' async for chunk in chain.astream([ - SystemMessage(content=f"""你需要根据如下内容来回答用户的问题:{search_response.answer}"""), + SystemMessage(content=f"""你需要根据如下内容来回答用户的问题:{search_response.answer},如果内容为'在提供的资料中未找到相关信息',你需要根据你自己的知识来回答用户问题"""), HumanMessage(content=param.question) ]): yield f'data: {json.dumps({"type": "messages", "data": chunk}, ensure_ascii=False)}\n\n'