From 366d80b79571e3466f42bb81179ca76f129a220f Mon Sep 17 00:00:00 2001 From: ChengjieLi Date: Thu, 10 Oct 2024 16:48:50 +0800 Subject: [PATCH] fix --- xinference/model/llm/utils.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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)