We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9705a2 commit 1c7bcc5Copy full SHA for 1c7bcc5
vllm/entrypoints/chat_utils.py
@@ -1437,7 +1437,8 @@ def _postprocess_messages(messages: list[ConversationMessage]) -> None:
1437
for item in message["tool_calls"]:
1438
# if arguments is None or empty string, set to {}
1439
if content := item["function"].get("arguments"):
1440
- item["function"]["arguments"] = json.loads(content)
+ if not isinstance(content, (dict, list)):
1441
+ item["function"]["arguments"] = json.loads(content)
1442
else:
1443
item["function"]["arguments"] = {}
1444
0 commit comments