Former-commit-id: 3ce44dda991e9cf6cbce1fbe22ef1927893b6c4d
This commit is contained in:
hiyouga 2024-06-22 00:00:38 +08:00
parent 0844750bb9
commit ccc9a895a6

View File

@ -93,7 +93,7 @@ def _process_request(
if message.role == Role.ASSISTANT and isinstance(message.tool_calls, list) and len(message.tool_calls):
tool_calls = [
{"name": tool_call.function.name, "argument": tool_call.function.arguments}
{"name": tool_call.function.name, "arguments": tool_call.function.arguments}
for tool_call in message.tool_calls
]
content = json.dumps(tool_calls, ensure_ascii=False)