ngdxzy commited on
Commit
306fd01
·
1 Parent(s): d84f809

fix: fix template

Browse files
Files changed (1) hide show
  1. chat_template.jinja +4 -8
chat_template.jinja CHANGED
@@ -97,11 +97,7 @@
97
  {%- endif %}
98
  {%- endif %}
99
  {%- set reasoning_content = reasoning_content|trim %}
100
- {%- if loop.index0 > ns.last_query_index %}
101
- {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
102
- {%- else %}
103
- {{- '<|im_start|>' + message.role + '\n' + content }}
104
- {%- endif %}
105
  {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
106
  {%- for tool_call in message.tool_calls %}
107
  {%- if tool_call.function is defined %}
@@ -146,9 +142,9 @@
146
  {%- endfor %}
147
  {%- if add_generation_prompt %}
148
  {{- '<|im_start|>assistant\n' }}
149
- {%- if enable_thinking is defined and enable_thinking is true %}
150
- {{- '<think>\n' }}
151
- {%- else %}
152
  {{- '<think>\n\n</think>\n\n' }}
 
 
153
  {%- endif %}
154
  {%- endif %}
 
97
  {%- endif %}
98
  {%- endif %}
99
  {%- set reasoning_content = reasoning_content|trim %}
100
+ {{- '<|im_start|>' + message.role + '\n' + content }}
 
 
 
 
101
  {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
102
  {%- for tool_call in message.tool_calls %}
103
  {%- if tool_call.function is defined %}
 
142
  {%- endfor %}
143
  {%- if add_generation_prompt %}
144
  {{- '<|im_start|>assistant\n' }}
145
+ {%- if enable_thinking is defined and enable_thinking is false %}
 
 
146
  {{- '<think>\n\n</think>\n\n' }}
147
+ {%- else %}
148
+ {{- '<think>\n' }}
149
  {%- endif %}
150
  {%- endif %}