diff --git a/chat_template.jinja b/chat_template.jinja index a585dec..d243fb2 100644 --- a/chat_template.jinja +++ b/chat_template.jinja @@ -97,7 +97,7 @@ {%- endif %} {%- endif %} {%- set reasoning_content = reasoning_content|trim %} - {%- if loop.index0 > ns.last_query_index %} + {%- if loop.index0 > ns.last_query_index or enable_history_reasoning is defined and enable_history_reasoning is true %} {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} {%- else %} {{- '<|im_start|>' + message.role + '\n' + content }}