Skip to content

Commit

Permalink
BUG: tool call streaming output has duplicated list (#2416)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengjieLi28 authored Oct 11, 2024
1 parent 8f62ca4 commit 9145e02
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions xinference/model/llm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,16 +393,14 @@ def _tool_calls_completion_chunk(cls, model_family, model_uid, c):
for content, func, args in tool_result:
if func:
tool_calls.append(
[
{
"id": f"call_{_id}",
"type": "function",
"function": {
"name": func,
"arguments": json.dumps(args, ensure_ascii=False),
},
}
]
{
"id": f"call_{_id}",
"type": "function",
"function": {
"name": func,
"arguments": json.dumps(args, ensure_ascii=False),
},
}
)
else:
failed_contents.append(content)
Expand Down

0 comments on commit 9145e02

Please sign in to comment.