mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-11-05 18:32:14 +08:00
fix api
Former-commit-id: dcbd6d86dfc49f12529b02ec331e3e5c05740061
This commit is contained in:
parent
fecde5c13f
commit
c6f5024e41
@ -93,7 +93,7 @@ def _process_request(
|
|||||||
|
|
||||||
if message.role == Role.ASSISTANT and isinstance(message.tool_calls, list) and len(message.tool_calls):
|
if message.role == Role.ASSISTANT and isinstance(message.tool_calls, list) and len(message.tool_calls):
|
||||||
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
|
for tool_call in message.tool_calls
|
||||||
]
|
]
|
||||||
content = json.dumps(tool_calls, ensure_ascii=False)
|
content = json.dumps(tool_calls, ensure_ascii=False)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user