Fix chat template thinking default

#8
Files changed (1) hide show
  1. chat_template.jinja +6 -6
chat_template.jinja CHANGED
@@ -1,5 +1,7 @@
1
  {%- set image_count = namespace(value=0) %}
2
  {%- set video_count = namespace(value=0) %}
 
 
3
  {%- macro render_content(content, do_vision_count, is_system_content=false) %}
4
  {%- if content is string %}
5
  {{- content }}
@@ -145,10 +147,8 @@
145
  {%- endif %}
146
  {%- endfor %}
147
  {%- if add_generation_prompt %}
148
- {{- '<|im_start|>assistant\n' }}
149
- {%- if enable_thinking is defined and enable_thinking is false %}
150
- {{- '<think>\n\n</think>\n\n' }}
151
- {%- else %}
152
- {{- '<think>' }}
153
- {%- endif %}
154
  {%- endif %}
 
1
  {%- set image_count = namespace(value=0) %}
2
  {%- set video_count = namespace(value=0) %}
3
+ {%- set add_vision_id = add_vision_id if add_vision_id is defined else false %}
4
+ {%- set enable_thinking = enable_thinking if enable_thinking is defined else false %}
5
  {%- macro render_content(content, do_vision_count, is_system_content=false) %}
6
  {%- if content is string %}
7
  {{- content }}
 
147
  {%- endif %}
148
  {%- endfor %}
149
  {%- if add_generation_prompt %}
150
+ {{- '<|im_start|>assistant\n' }}
151
+ {%- if enable_thinking %}
152
+ {{- '<think>\n' }}
153
+ {%- endif %}
 
 
154
  {%- endif %}