[Bugfix][ToolParser] Stream every tool call when one delta completes several (#60354)
Signed-off-by: Junyi Yao <j.yao@wustl.edu> Signed-off-by: sfeng33 <4florafeng@gmail.com> Co-authored-by: sfeng33 <4florafeng@gmail.com>
This commit is contained in:
@@ -640,12 +640,6 @@ class OnlineDerenderer:
|
||||
if tc.index < len(last_tool_call_ids):
|
||||
# Pin: reuse the ID already recorded for this index
|
||||
# rather than one a from scratch replay regenerated.
|
||||
# Real trigger not just defensive with
|
||||
# tool_choice="required",
|
||||
# extract_required_tool_call_streaming resets
|
||||
# function_name_returned to False whenever the
|
||||
# partial JSON transiently fails to parse which
|
||||
# re-emits id+name for the same index on replay.
|
||||
tc.id = last_tool_call_ids[tc.index]
|
||||
else:
|
||||
last_tool_call_ids.append(tc.id)
|
||||
|
||||
Reference in New Issue
Block a user