From 2cd94dd07eeaa4550918d1775f920f090571c750 Mon Sep 17 00:00:00 2001 From: Yiming Date: Tue, 9 Sep 2025 15:47:28 +0800 Subject: [PATCH] tool-call(dsv3): Fixed a parse problem when there are multiple function definitions in tool_calls (#10209) --- examples/chat_template/tool_chat_template_deepseekv3.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chat_template/tool_chat_template_deepseekv3.jinja b/examples/chat_template/tool_chat_template_deepseekv3.jinja index 526368b0c..46c1b8801 100644 --- a/examples/chat_template/tool_chat_template_deepseekv3.jinja +++ b/examples/chat_template/tool_chat_template_deepseekv3.jinja @@ -55,7 +55,7 @@ {%- endif %} {%- set ns.is_first = true -%} {%- else %} - {{- '\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\n' + '```json' + '\n' + tool['function']['arguments'] + '\n' + '```' + '<|tool▁call▁end|>'}} + {{- '\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\n' + '```json' + '\n' + tool['function']['arguments']|tojson + '\n' + '```' + '<|tool▁call▁end|>'}} {%- endif %} {%- endfor %} {{- '<|tool▁calls▁end|><|end▁of▁sentence|>'}}