danielhanchen commited on
Commit
09c9056
·
verified ·
1 Parent(s): f409793

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +1 -6
chat_template.jinja CHANGED
@@ -266,11 +266,6 @@
266
  {#- At this point only assistant/user/tool messages should remain #}
267
  {%- if message.role == 'assistant' -%}
268
  {#- Checks to ensure the messages are being passed in the format we expect #}
269
- {%- if "content" in message %}
270
- {%- if "<|channel|>analysis<|message|>" in message.content or "<|channel|>final<|message|>" in message.content %}
271
- {{- raise_exception("You have passed a message containing <|channel|> tags in the content field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
272
- {%- endif %}
273
- {%- endif %}
274
  {%- if "thinking" in message %}
275
  {%- if "<|channel|>analysis<|message|>" in message.thinking or "<|channel|>final<|message|>" in message.thinking %}
276
  {{- raise_exception("You have passed a message containing <|channel|> tags in the thinking field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
@@ -321,7 +316,7 @@
321
  {{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
322
  {%- elif "thinking" in message %}
323
  {#- CoT is dropped during all previous turns, so we never render it for inference #}
324
- {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.content + "<|end|>" }}
325
  {%- set last_tool_call.name = none %}
326
  {%- else %}
327
  {#- CoT is dropped during all previous turns, so we never render it for inference #}
 
266
  {#- At this point only assistant/user/tool messages should remain #}
267
  {%- if message.role == 'assistant' -%}
268
  {#- Checks to ensure the messages are being passed in the format we expect #}
 
 
 
 
 
269
  {%- if "thinking" in message %}
270
  {%- if "<|channel|>analysis<|message|>" in message.thinking or "<|channel|>final<|message|>" in message.thinking %}
271
  {{- raise_exception("You have passed a message containing <|channel|> tags in the thinking field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
 
316
  {{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
317
  {%- elif "thinking" in message %}
318
  {#- CoT is dropped during all previous turns, so we never render it for inference #}
319
+ {{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
320
  {%- set last_tool_call.name = none %}
321
  {%- else %}
322
  {#- CoT is dropped during all previous turns, so we never render it for inference #}