{% for message in messages %}{% if loop.first and message.role != 'system' %}<|im_start|>system
## Metadata

{% if enable_thinking %}
Reasoning Mode: /think
{% else %}
Reasoning Mode: /no_think
{% endif %}

## Custom Instructions

You are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>
{% endif %}<|im_start|>{{ message.role }}
{{message.content}}<|im_end|>
{% endfor %}{% if add_generation_prompt %}
{% if enable_thinking %}
<|im_start|>assistant
<think>
{% else %}
<|im_start|>assistant
{% endif %}{% endif %}