Text Generation
Transformers
Safetensors
minimax
conversational
fp8
danielhanchen commited on
Commit
120704e
·
verified ·
1 Parent(s): 93a44d1

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. 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
- {%- set last_tool_call.name = message.tool_calls[-1].name -%}
 
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 -%}