Skip to content

Commit 7c52bb1

Browse files
committed
[0.32.0-dlc][tool] Fix tool calling output
1 parent 8b8853a commit 7c52bb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engines/python/setup/djl_python/output_formatter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ def _json_chat_output_formatter(request_output: TextGenerationOutput):
335335
"message": {
336336
"role": "assistant",
337337
"content": "",
338+
"tool_calls": tool_calls,
338339
},
339-
"tool_calls": tool_calls,
340340
"logprobs": None,
341341
"finish_reason": best_sequence.finish_reason,
342342
}
@@ -353,8 +353,8 @@ def _json_chat_output_formatter(request_output: TextGenerationOutput):
353353
"message": {
354354
"role": "assistant",
355355
"content": tool_call_info.content,
356+
"tool_calls": tool_calls,
356357
},
357-
"tool_calls": tool_calls,
358358
"logprobs": None,
359359
"finish_reason": "tool_calls",
360360
}

0 commit comments

Comments
 (0)