From b0ae65d1b0983730da42b625b0fb038e74c0966b Mon Sep 17 00:00:00 2001 From: luukunn <981429396@qq.com> Date: Tue, 24 Mar 2026 20:55:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=AF=E6=8C=81glm=20tool=E4=B8=8Econten?= =?UTF-8?q?t=E5=90=8C=E6=97=B6=E5=87=BA=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastdeploy/input/text_processor.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/fastdeploy/input/text_processor.py b/fastdeploy/input/text_processor.py index f6e845f0aab..9c71b414df6 100644 --- a/fastdeploy/input/text_processor.py +++ b/fastdeploy/input/text_processor.py @@ -404,7 +404,6 @@ def process_response(self, response_dict, **kwargs): tool_call_info = tool_parser.extract_tool_calls(full_text, response_dict) if tool_call_info.tools_called: response_dict.outputs.tool_calls = tool_call_info.tool_calls - response_dict.outputs.text = tool_call_info.content data_processor_logger.info(f"req_id:{req_id}, token_ids: {token_ids}") return response_dict @@ -443,7 +442,6 @@ def process_response_dict_normal(self, response_dict, **kwargs): tool_call_info = tool_parser.extract_tool_calls(full_text, response_dict) if tool_call_info.tools_called: response_dict["outputs"]["tool_calls"] = tool_call_info.tool_calls - response_dict["outputs"]["text"] = tool_call_info.content data_processor_logger.info(f"req_id:{req_id}, decode_status: {self.decode_status[req_id]}") del self.decode_status[req_id] return response_dict From 7511953cf4c755fe1312bd989d71f8033ab0f274 Mon Sep 17 00:00:00 2001 From: luukunn <981429396@qq.com> Date: Wed, 25 Mar 2026 11:07:35 +0800 Subject: [PATCH 2/2] fix unit test --- tests/input/test_text_processor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/input/test_text_processor.py b/tests/input/test_text_processor.py index f6b255a8d3a..46df374f54f 100644 --- a/tests/input/test_text_processor.py +++ b/tests/input/test_text_processor.py @@ -459,7 +459,7 @@ def test_process_response_with_reasoning_and_tools(self): ) processed = processor.process_response(response) - self.assertEqual(processed.outputs.text, "tool-only") + self.assertEqual(processed.outputs.text, "1!") self.assertEqual(processed.outputs.reasoning_content, "think") self.assertEqual(processed.outputs.tool_calls, ["tool"]) @@ -505,7 +505,7 @@ def test_process_response_dict_normal_with_reasoning(self): result = processor.process_response_dict_normal(response, enable_thinking=True) self.assertEqual(result["outputs"]["completion_tokens"], "7") - self.assertEqual(result["outputs"]["text"], "tool-text") + self.assertEqual(result["outputs"]["text"], "7!") self.assertEqual(result["outputs"]["reasoning_content"], "because") self.assertEqual(result["outputs"]["reasoning_token_num"], 1)