Rocketknight1 HF Staff commited on
Commit
cdd7d20
·
verified ·
1 Parent(s): 590a8a2

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +2 -0
chat_template.jinja CHANGED
@@ -249,6 +249,7 @@
249
 
250
  {%- elif m.role == "assistant" -%}
251
  {%- set prev_has_task = idx > 0 and msgs[idx - 1].get("task") is not none -%}
 
252
  {%- if thinking and not prev_has_task and (not effective_drop or idx > state.last_user) -%}
253
  {{- ((m.reasoning_content if m.get("reasoning_content") is not none else m.get("thinking")) or "") ~ "</think>" -}}
254
  {%- endif -%}
@@ -269,6 +270,7 @@
269
  {{- "\n\n<" ~ DSML ~ " calls>\n" ~ tcs.lines | join("\n") ~ "\n</" ~ DSML ~ " calls>" -}}
270
  {%- endif -%}
271
  {%- if not m.get("wo_eos", false) -%}{{- "<|end▁of▁sentence|>" -}}{%- endif -%}
 
272
 
273
  {%- else -%}
274
  {{- raise_exception("Unknown role: " ~ m.role) -}}
 
249
 
250
  {%- elif m.role == "assistant" -%}
251
  {%- set prev_has_task = idx > 0 and msgs[idx - 1].get("task") is not none -%}
252
+ {%- generation -%}
253
  {%- if thinking and not prev_has_task and (not effective_drop or idx > state.last_user) -%}
254
  {{- ((m.reasoning_content if m.get("reasoning_content") is not none else m.get("thinking")) or "") ~ "</think>" -}}
255
  {%- endif -%}
 
270
  {{- "\n\n<" ~ DSML ~ " calls>\n" ~ tcs.lines | join("\n") ~ "\n</" ~ DSML ~ " calls>" -}}
271
  {%- endif -%}
272
  {%- if not m.get("wo_eos", false) -%}{{- "<|end▁of▁sentence|>" -}}{%- endif -%}
273
+ {%- endgeneration -%}
274
 
275
  {%- else -%}
276
  {{- raise_exception("Unknown role: " ~ m.role) -}}