Skip to content

Commit b93a015

Browse files
authored
Try fix GLM-4.6.jinja
1 parent ea4f0ac commit b93a015

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

models/templates/GLM-4.6.jinja

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,8 @@ For each function call, output the function name and arguments within the follow
7171
{%- set tc = tc.function %}
7272
{%- endif %}
7373
{{ '\n<tool_call>' + tc.name }}
74-
{% set _args = tc.arguments %}
75-
{%- if _args is not mapping -%}
76-
{%- set _args = {} %}
77-
{%- endif -%}
78-
{% for k, v in _args | items %}
74+
{% set _args = tc.arguments or {} %}
75+
{% for k, v in _args.items() %}
7976
<arg_key>{{ k }}</arg_key>
8077
<arg_value>{{ v | tojson(ensure_ascii=False) if v is not string else v }}</arg_value>
8178
{% endfor %}

0 commit comments

Comments
 (0)