fix platform basic test compatibility

This commit is contained in:
2026-07-15 14:25:52 +08:00
parent e374b14bf9
commit 2b7880efa7
6 changed files with 153 additions and 18 deletions

View File

@@ -138,12 +138,18 @@
{{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
{%- endif %}
{%- if tool_call.arguments is defined %}
{%- for args_name, args_value in tool_call.arguments|items %}
{{- '<parameter=' + args_name + '>\n' }}
{%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
{{- args_value }}
{%- if tool_call.arguments is string %}
{{- '<parameter=arguments>\n' }}
{{- tool_call.arguments }}
{{- '\n</parameter>\n' }}
{%- endfor %}
{%- elif tool_call.arguments is mapping %}
{%- for args_name, args_value in tool_call.arguments|items %}
{{- '<parameter=' + args_name + '>\n' }}
{%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
{{- args_value }}
{{- '\n</parameter>\n' }}
{%- endfor %}
{%- endif %}
{%- endif %}
{{- '</function>\n</tool_call>' }}
{%- endfor %}
@@ -172,4 +178,4 @@
{%- else %}
{{- '<think>\n' }}
{%- endif %}
{%- endif %}
{%- endif %}