diff --git a/xinference/model/llm/utils.py b/xinference/model/llm/utils.py index a70341fff5..494c1d3f38 100644 --- a/xinference/model/llm/utils.py +++ b/xinference/model/llm/utils.py @@ -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)