Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions fastdeploy/input/text_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines 404 to 406
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR 标题未完全符合仓库 Cherry-Pick 规范:除了开头的 [Cherry-Pick] 外,通常还需要至少一个语义标签(如 [BugFix]/[Feature]/[APIServer] 等),并将原始 PR 号以 "(#6656)" 形式附在标题末尾。建议按模板示例调整标题格式以通过 CI 校验。

Copilot uses AI. Check for mistakes.
response_dict.outputs.text = tool_call_info.content
data_processor_logger.info(f"req_id:{req_id}, token_ids: {token_ids}")

return response_dict
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/input/test_text_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down Expand Up @@ -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)

Expand Down
Loading