Update chat_template.jinja
Browse files- chat_template.jinja +3 -2
chat_template.jinja
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
{# Unsloth template fixes #}
|
| 2 |
{# ----------‑‑‑ special token variables ‑‑‑---------- #}
|
| 3 |
{%- set toolcall_begin_token = '<minimax:tool_call>' -%}
|
| 4 |
{%- set toolcall_end_token = '</minimax:tool_call>' -%}
|
|
@@ -129,7 +129,8 @@
|
|
| 129 |
{%- endfor -%}
|
| 130 |
|
| 131 |
{{- toolcall_end_token}}
|
| 132 |
-
{
|
|
|
|
| 133 |
{%- else -%}
|
| 134 |
{%- set last_tool_call.name = none -%}
|
| 135 |
{%- endif -%}
|
|
|
|
| 1 |
+
{# Unsloth & community template fixes #}
|
| 2 |
{# ----------‑‑‑ special token variables ‑‑‑---------- #}
|
| 3 |
{%- set toolcall_begin_token = '<minimax:tool_call>' -%}
|
| 4 |
{%- set toolcall_end_token = '</minimax:tool_call>' -%}
|
|
|
|
| 129 |
{%- endfor -%}
|
| 130 |
|
| 131 |
{{- toolcall_end_token}}
|
| 132 |
+
{# Fix by ochafik - https://github.com/ochafik/minja/pull/7#issuecomment-3478459580 #}
|
| 133 |
+
{%- set last_tool_call.name = message.tool_calls[-1].function.name -%}
|
| 134 |
{%- else -%}
|
| 135 |
{%- set last_tool_call.name = none -%}
|
| 136 |
{%- endif -%}
|