Update chat_template.jinja
Browse files- chat_template.jinja +6 -2
chat_template.jinja
CHANGED
|
@@ -36,7 +36,9 @@
|
|
| 36 |
{%- set content = message['content'] -%}
|
| 37 |
{%- if thinking %}
|
| 38 |
{%- if not keep_cots %}
|
| 39 |
-
{%- set
|
|
|
|
|
|
|
| 40 |
{%- endif %}
|
| 41 |
{%- endif %}
|
| 42 |
{{- '\n' + content + '<|eot_id|>' }}
|
|
@@ -47,7 +49,9 @@
|
|
| 47 |
{%- set content = message['content'] -%}
|
| 48 |
{%- if thinking %}
|
| 49 |
{%- if not keep_cots %}
|
| 50 |
-
{%- set
|
|
|
|
|
|
|
| 51 |
{%- endif %}
|
| 52 |
{%- endif %}
|
| 53 |
{{- '\n' + content }}
|
|
|
|
| 36 |
{%- set content = message['content'] -%}
|
| 37 |
{%- if thinking %}
|
| 38 |
{%- if not keep_cots %}
|
| 39 |
+
{%- set splitted = content.split('</think>') -%}
|
| 40 |
+
{%- set second_part = splitted[1:] | join('</think>') -%}
|
| 41 |
+
{%- set content = '<think> </think>' + second_part -%}
|
| 42 |
{%- endif %}
|
| 43 |
{%- endif %}
|
| 44 |
{{- '\n' + content + '<|eot_id|>' }}
|
|
|
|
| 49 |
{%- set content = message['content'] -%}
|
| 50 |
{%- if thinking %}
|
| 51 |
{%- if not keep_cots %}
|
| 52 |
+
{%- set splitted = content.split('</think>') -%}
|
| 53 |
+
{%- set second_part = splitted[1:] | join('</think>') -%}
|
| 54 |
+
{%- set content = '<think> </think>' + second_part -%}
|
| 55 |
{%- endif %}
|
| 56 |
{%- endif %}
|
| 57 |
{{- '\n' + content }}
|