Update chat_template.jinja
Browse files- chat_template.jinja +2 -2
chat_template.jinja
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
{#- Tool Rendering Functions ============================================== -#}
|
| 6 |
{%- macro render_tool_namespace(namespace_name, tool_list) -%}
|
| 7 |
{%- for tool in tool_list -%}
|
| 8 |
-
<tool>{{ tool.function | tojson
|
| 9 |
{% endfor -%}
|
| 10 |
{%- endmacro -%}
|
| 11 |
{%- macro visible_text(content) -%}
|
|
@@ -121,7 +121,7 @@
|
|
| 121 |
{% set _args = tool_call.arguments %}
|
| 122 |
{%- for k, v in _args.items() %}
|
| 123 |
{{- '<parameter name="' + k + '">' }}
|
| 124 |
-
{{- v | tojson
|
| 125 |
{{- '</parameter>' }}
|
| 126 |
{% endfor %}
|
| 127 |
{{- '</invoke>' ~ '\n' }}
|
|
|
|
| 5 |
{#- Tool Rendering Functions ============================================== -#}
|
| 6 |
{%- macro render_tool_namespace(namespace_name, tool_list) -%}
|
| 7 |
{%- for tool in tool_list -%}
|
| 8 |
+
<tool>{{ tool.function | tojson | string }}</tool>
|
| 9 |
{% endfor -%}
|
| 10 |
{%- endmacro -%}
|
| 11 |
{%- macro visible_text(content) -%}
|
|
|
|
| 121 |
{% set _args = tool_call.arguments %}
|
| 122 |
{%- for k, v in _args.items() %}
|
| 123 |
{{- '<parameter name="' + k + '">' }}
|
| 124 |
+
{{- v | tojson | string if v is not string else v }}
|
| 125 |
{{- '</parameter>' }}
|
| 126 |
{% endfor %}
|
| 127 |
{{- '</invoke>' ~ '\n' }}
|