danielhanchen commited on
Commit
a25f44a
·
verified ·
1 Parent(s): be42bda

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +2 -5
chat_template.jinja CHANGED
@@ -36,8 +36,8 @@
36
  {%- set reasoning_content = message.reasoning_content %}
37
  {%- else %}
38
  {%- if '</think>' in content %}
39
- {%- set reasoning_content = ((content.split('</think>')|first).rstrip('\n').split('<think>')|last).lstrip('\n') %}
40
- {%- set content = (content.split('</think>')|last).lstrip('\n') %}
41
  {%- endif %}
42
  {%- endif %}
43
  {%- if loop.index0 > ns.last_query_index %}
@@ -83,7 +83,4 @@
83
  {%- endfor %}
84
  {%- if add_generation_prompt %}
85
  {{- '<|im_start|>assistant\n' }}
86
- {%- if enable_thinking is defined and enable_thinking is false %}
87
- {{- '<think>\n\n</think>\n\n' }}
88
- {%- endif %}
89
  {%- endif %}
 
36
  {%- set reasoning_content = message.reasoning_content %}
37
  {%- else %}
38
  {%- if '</think>' in content %}
39
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
40
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
41
  {%- endif %}
42
  {%- endif %}
43
  {%- if loop.index0 > ns.last_query_index %}
 
83
  {%- endfor %}
84
  {%- if add_generation_prompt %}
85
  {{- '<|im_start|>assistant\n' }}
 
 
 
86
  {%- endif %}