From afddc40ab5feb67f556b3784fdd7af6254f1057d Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Tue, 30 Jul 2024 11:05:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=9F=A5=E8=AF=86?= =?UTF-8?q?=E5=BA=93=E6=A3=80=E7=B4=A2=E5=90=91=E9=87=8F=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=E6=97=B6=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=20(#897)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../step/search_dataset_step/impl/base_search_dataset_step.py | 2 +- .../search_dataset_node/impl/base_search_dataset_node.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/application/chat_pipeline/step/search_dataset_step/impl/base_search_dataset_step.py b/apps/application/chat_pipeline/step/search_dataset_step/impl/base_search_dataset_step.py index 0d43c3b2a4..c13b414dc3 100644 --- a/apps/application/chat_pipeline/step/search_dataset_step/impl/base_search_dataset_step.py +++ b/apps/application/chat_pipeline/step/search_dataset_step/impl/base_search_dataset_step.py @@ -35,7 +35,7 @@ def get_model_by_id(_id, user_id): def get_embedding_id(dataset_id_list): dataset_list = QuerySet(DataSet).filter(id__in=dataset_id_list) if len(set([dataset.embedding_mode_id for dataset in dataset_list])) > 1: - raise Exception("知识库未向量模型不一致") + raise Exception("关联知识库的向量模型不一致,无法召回分段。") if len(dataset_list) == 0: raise Exception("知识库设置错误,请重新设置知识库") return dataset_list[0].embedding_mode_id diff --git a/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py b/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py index 60bec0a4a3..bc7e4c8539 100644 --- a/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py +++ b/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py @@ -25,7 +25,7 @@ def get_embedding_id(dataset_id_list): dataset_list = QuerySet(DataSet).filter(id__in=dataset_id_list) if len(set([dataset.embedding_mode_id for dataset in dataset_list])) > 1: - raise Exception("知识库未向量模型不一致") + raise Exception("关联知识库的向量模型不一致,无法召回分段。") if len(dataset_list) == 0: raise Exception("知识库设置错误,请重新设置知识库") return dataset_list[0].embedding_mode_id