File size: 879 Bytes
5c7cb23 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | {%- if messages[0]['role'] == 'system' %}
{{- messages[0]['content'] }}
{%- else %}
{{- 'A conversation between a User and Assistant. The User asks a question, and the Assistant solves it. The Assistant first thinks about the reasoning process in the mind and then provides the User with the answer. The reasoning process is enclosed within <think> and </think> tags, followed by the answer i.e., <think> Reasoning process here </think> Answer here.' }}
{%- endif %}
{%- for message in messages %}
{%- if message['role'] == 'user' %}
{{- '\n\nUser: ' + message['content'].strip() }}
{%- elif message['role'] == 'system' %}
{{- message['content'] }}
{%- elif message['role'] == 'assistant' %}
{{- '\n\nAssistant: ' + message['content'] }}
{%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '\n\nAssistant: ' }}
{%- endif %} |