danielhanchen commited on
Commit
1521069
·
verified ·
1 Parent(s): aebef2b

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +3 -2
chat_template.jinja CHANGED
@@ -36,8 +36,9 @@
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 %}
 
36
  {%- set reasoning_content = message.reasoning_content %}
37
  {%- else %}
38
  {%- if '</think>' in content %}
39
+ {%- set reasoning_content = (content.split('</think>')|first).rstrip('\n') %}
40
+ {%- set reasoning_content = (reasoning_content.split('<think>')|last).lstrip('\n') %}
41
+ {%- set content = (content.split('</think>')|last).lstrip('\n') %}
42
  {%- endif %}
43
  {%- endif %}
44
  {%- if loop.index0 > ns.last_query_index %}