{% for m in messages -%} | |
{%- if m['role'] == 'system' -%} | |
<<SYS>> | |
{{ m['content'] | trim }} | |
<</SYS>> | |
{%- elif m['role'] == 'user' -%} | |
User: {{ m['content'] | trim }} | |
{%- elif m['role'] == 'assistant' -%} | |
Assistant: {{ m['content'] }} | |
{%- endif -%} | |
{%- endfor -%}{% if add_generation_prompt %}Assistant: {% endif %} |