Update chat_template.jinja
Browse files- chat_template.jinja +2 -2
chat_template.jinja
CHANGED
|
@@ -49,8 +49,8 @@
|
|
| 49 |
{%- set hist_msgs = messages[:ns.last_non_tool_call_assistant_msg+1] -%}
|
| 50 |
{%- set suffix_msgs = messages[ns.last_non_tool_call_assistant_msg+1:] -%}
|
| 51 |
|
| 52 |
-
{%- if tools -%}
|
| 53 |
-
<|im_system|>tool_declare<|im_middle|>{{
|
| 54 |
{%- endif -%}
|
| 55 |
|
| 56 |
{%- if messages and messages|length > 0 -%}
|
|
|
|
| 49 |
{%- set hist_msgs = messages[:ns.last_non_tool_call_assistant_msg+1] -%}
|
| 50 |
{%- set suffix_msgs = messages[ns.last_non_tool_call_assistant_msg+1:] -%}
|
| 51 |
|
| 52 |
+
{%- if tools -%}{%- set tools_json = tools | tojson -%}{%- set tools_json =tools_json.replace(", ", ",") -%}
|
| 53 |
+
<|im_system|>tool_declare<|im_middle|>{{ tools_json }}<|im_end|>
|
| 54 |
{%- endif -%}
|
| 55 |
|
| 56 |
{%- if messages and messages|length > 0 -%}
|