From 99483b1b4b7d5fd27f5054c9a358467332928e13 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Sun, 28 Apr 2024 17:59:02 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=9C=AA=E9=85=8D?= =?UTF-8?q?=E7=BD=AEai=E6=A8=A1=E5=9E=8B=E5=9B=9E=E7=AD=94=20(#299)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat_pipeline/step/chat_step/impl/base_chat_step.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py b/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py index b53f12941..d03f17b4f 100644 --- a/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py +++ b/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py @@ -142,7 +142,7 @@ class BaseChatStep(IChatStep): 'status') == 'designated_answer': return iter([AIMessageChunk(content=no_references_setting.get('value'))]), False if chat_model is None: - return iter([AIMessageChunk('抱歉,没有在知识库中查询到相关信息。')]), False + return iter([AIMessageChunk('抱歉,没有配置 AI 模型,无法优化引用分段,请先去应用中设置 AI 模型。')]), False else: return chat_model.stream(message_list), True @@ -185,7 +185,7 @@ class BaseChatStep(IChatStep): 'status') == 'designated_answer': return AIMessage(no_references_setting.get('value')), False if chat_model is None: - return AIMessage('抱歉,没有在知识库中查询到相关信息。'), False + return AIMessage('抱歉,没有配置 AI 模型,无法优化引用分段,请先去应用中设置 AI 模型。'), False else: return chat_model.invoke(message_list), True