Why can't my chatml make the model speak normally?

#5
by Andrewwwwww - opened

<|system|>
{{ (messages|selectattr('role', 'equalto', 'system')|list|last).content|trim if (messages|selectattr('role', 'equalto', 'system')|list) else '' }}
<|im_end|>

{% for message in messages %}
{% if message['role'] == 'user' %}
<|im_start|>user
{{ message['content']|trim }}
<|im_end|>

{% elif message['role'] == 'assistant' %}
<|im_start|>assistant
{{ message['content']|trim }}
<|im_end|>

{% endif %}
{% endfor %}

Sign up or log in to comment