From b10147ea3626e601cb4a5a07c9d65bab6d412ae4 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:18:41 +0800 Subject: [PATCH] fix: Workflow embedding sub application thinking process switch cannot control thinking process output (#2502) --- .../step/chat_step/impl/base_chat_step.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 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 e782e7e3f..ac0dcd439 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 @@ -307,11 +307,12 @@ class BaseChatStep(IChatStep): return manage.get_base_to_response().to_block_response(str(chat_id), str(chat_record_id), content, True, request_token, response_token, - {'reasoning_content': reasoning_content, - 'answer_list': [{ - 'content': content, - 'reasoning_content': reasoning_content - }]}) + { + 'reasoning_content': reasoning_content if reasoning_content_enable else '', + 'answer_list': [{ + 'content': content, + 'reasoning_content': reasoning_content if reasoning_content_enable else '' + }]}) except Exception as e: all_text = 'Exception:' + str(e) write_context(self, manage, 0, 0, all_text)