From d438bbcc48a68dd08d8b25de6f698d66fb710b62 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:45:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E9=9D=9E=E5=BF=85=E5=A1=AB=E6=8A=A5=E9=94=99=20(#889)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/application/chat_pipeline/step/chat_step/i_chat_step.py | 2 +- .../chat_pipeline/step/chat_step/impl/base_chat_step.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/application/chat_pipeline/step/chat_step/i_chat_step.py b/apps/application/chat_pipeline/step/chat_step/i_chat_step.py index 18b08ea7a..55ba166cf 100644 --- a/apps/application/chat_pipeline/step/chat_step/i_chat_step.py +++ b/apps/application/chat_pipeline/step/chat_step/i_chat_step.py @@ -53,7 +53,7 @@ class IChatStep(IBaseChatPipelineStep): # 对话列表 message_list = serializers.ListField(required=True, child=MessageField(required=True), error_messages=ErrMessage.list("对话列表")) - model_id = serializers.UUIDField(required=True, error_messages=ErrMessage.uuid("模型id")) + model_id = serializers.UUIDField(required=False, allow_null=True, error_messages=ErrMessage.uuid("模型id")) # 段落列表 paragraph_list = serializers.ListField(error_messages=ErrMessage.list("段落列表")) # 对话id 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 750335e2d..2667d34a2 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 @@ -111,7 +111,7 @@ class BaseChatStep(IChatStep): client_id=None, client_type=None, no_references_setting=None, **kwargs): - chat_model = get_model_instance_by_model_user_id(model_id, user_id) + chat_model = get_model_instance_by_model_user_id(model_id, user_id) if model_id is not None else None if stream: return self.execute_stream(message_list, chat_id, problem_text, post_response_handler, chat_model, paragraph_list,