Update chat_template.jinja

#6
by qgallouedec HF Staff - opened
Files changed (1) hide show
  1. chat_template.jinja +2 -2
chat_template.jinja CHANGED
@@ -142,7 +142,7 @@
142
 
143
  {%- elif msg.role == "assistant" -%}
144
  {%- set rc = msg.get("reasoning_content", "") or "" -%}
145
- {%- if (thinking_mode == "thinking") and (not prev_has_task) and ((not effective_drop) or idx > fns.lu_idx) -%}
146
  {{- rc -}}{{- "</think>" -}}
147
  {%- endif -%}
148
  {{- msg.get("content", "") or "" -}}
@@ -190,7 +190,7 @@
190
  {%- elif need_transition and (msg.role == "user" or msg.role == "developer") and not (is_last and not add_generation_prompt) -%}
191
  {{- "<|Assistant|>" -}}
192
  {%- if thinking_mode == "thinking" -%}
193
- {{- "<think>" if (not effective_drop) or idx >= fns.lu_idx else "</think>" -}}
194
  {%- else -%}
195
  {{- "</think>" -}}
196
  {%- endif -%}
 
142
 
143
  {%- elif msg.role == "assistant" -%}
144
  {%- set rc = msg.get("reasoning_content", "") or "" -%}
145
+ {%- if (thinking_mode == "thinking") and (not prev_has_task) -%}
146
  {{- rc -}}{{- "</think>" -}}
147
  {%- endif -%}
148
  {{- msg.get("content", "") or "" -}}
 
190
  {%- elif need_transition and (msg.role == "user" or msg.role == "developer") and not (is_last and not add_generation_prompt) -%}
191
  {{- "<|Assistant|>" -}}
192
  {%- if thinking_mode == "thinking" -%}
193
+ {{- "<think>" -}}
194
  {%- else -%}
195
  {{- "</think>" -}}
196
  {%- endif -%}