You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% set tool_ns.text = tool_ns.text + "\nIMPORTANT: ALWAYS adhere to this exact format for tool use:\n<|tool▁calls▁begin|><|tool▁call▁begin|>tool_call_name<|tool▁sep|>tool_call_arguments<|tool▁call▁end|>{{additional_tool_calls}}<|tool▁calls▁end|>\n\nWhere:\n\n- `tool_call_name` must be an exact match to one of the available tools\n- `tool_call_arguments` must be valid JSON that strictly follows the tool's Parameters Schema\n- For multiple tool calls, chain them directly without separators or spaces\n" %}
46
-
{% set ns.system_prompt = ns.system_prompt + '\n\n' + tool_ns.text %}
45
+
{% set ns.system_prompt = (ns.system_prompt + '\n\n' if ns.system_prompt else '') + tool_ns.text %}
47
46
{% endif %}
48
-
49
-
{{ bos_token }}{{ ns.system_prompt }}
47
+
{{- bos_token }}{{ ns.system_prompt }}
50
48
{%- for message in messages %}
51
49
{%- if message['role'] == 'user' %}
52
50
{%- set ns.is_tool = false -%}
53
51
{%- set ns.is_first = false -%}
54
52
{%- set ns.is_last_user = true -%}
55
-
{{'<|User|>' + message['content']}}
53
+
{{- '<|User|>' + message['content'] -}}
56
54
{%- endif %}
57
55
{%- if message['role'] == 'assistant' and message['tool_calls'] is defined and message['tool_calls'] is not none %}
0 commit comments