From cc9a31c66226257b900b7515bbbc8dc7b97c444a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E4=BA=AC=E5=B0=8F=E6=B1=A4=E5=8C=85?= <66169658+WangJianQ-0118@users.noreply.github.com> Date: Wed, 3 Sep 2025 11:29:21 +0800 Subject: [PATCH] Update tool_chat_template_deepseekv31.jinja (#9895) --- examples/chat_template/tool_chat_template_deepseekv31.jinja | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/chat_template/tool_chat_template_deepseekv31.jinja b/examples/chat_template/tool_chat_template_deepseekv31.jinja index 9149cb442..08e93a30a 100644 --- a/examples/chat_template/tool_chat_template_deepseekv31.jinja +++ b/examples/chat_template/tool_chat_template_deepseekv31.jinja @@ -43,13 +43,13 @@ {%- for tool in message['tool_calls'] %} {%- if not ns.is_first %} {%- if message['content'] is none %} - {{'<|tool▁calls▁begin|><|tool▁call▁begin|>'+ tool['function']['name'] + '<|tool▁sep|>' + tool['function']['arguments'] + '<|tool▁call▁end|>'}} + {{'<|tool▁calls▁begin|><|tool▁call▁begin|>'+ tool['function']['name'] + '<|tool▁sep|>' + tool['function']['arguments']|tojson + '<|tool▁call▁end|>'}} {%- else %} - {{message['content'] + '<|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['function']['name'] + '<|tool▁sep|>' + tool['function']['arguments'] + '<|tool▁call▁end|>'}} + {{message['content'] + '<|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['function']['name'] + '<|tool▁sep|>' + tool['function']['arguments']|tojson + '<|tool▁call▁end|>'}} {%- endif %} {%- set ns.is_first = true -%} {%- else %} - {{'<|tool▁call▁begin|>'+ tool['function']['name'] + '<|tool▁sep|>' + tool['function']['arguments'] + '<|tool▁call▁end|>'}} + {{'<|tool▁call▁begin|>'+ tool['function']['name'] + '<|tool▁sep|>' + tool['function']['arguments']|tojson + '<|tool▁call▁end|>'}} {%- endif %} {%- endfor %} {{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}