Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions vllm/entrypoints/chat_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1450,9 +1450,13 @@
and isinstance(message["tool_calls"], list)
):
for item in message["tool_calls"]:
item["function"]["arguments"] = json.loads(
item["function"]["arguments"]
)
arguments = item["function"]["arguments"]
function_name = item["function"]["name"]
try:
item["function"]["arguments"] = json.loads(arguments)
except Exception as e:
logger.exception(f"load function arguments to json error, info: {e}, function name: {function_name}, arguments: {arguments} !!!")

Check failure on line 1458 in vllm/entrypoints/chat_utils.py

View workflow job for this annotation

GitHub Actions / pre-commit

Ruff (E501)

vllm/entrypoints/chat_utils.py:1458:81: E501 Line too long (149 > 80)

Check failure on line 1458 in vllm/entrypoints/chat_utils.py

View workflow job for this annotation

GitHub Actions / pre-commit

Ruff (G004)

vllm/entrypoints/chat_utils.py:1458:38: G004 Logging statement uses f-string
raise ValueError(str(e)) from e


def parse_chat_messages(
Expand Down
Loading