sparrow8i8's picture
(Trained with Unsloth)
2d13c4c verified
raw
history blame contribute delete
444 Bytes
{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|begin_of_text|><|start_header_id|>system<|end_header_id|>
' + message['content'] + '<|eot_id|>' }}{% elif message['role'] == 'user' %}{{ '<|start_header_id|>user<|end_header_id|>
' + message['content'] + '<|eot_id|>' }}{% elif message['role'] == 'assistant' %}{{ '<|start_header_id|>assistant<|end_header_id|>
' + message['content'] + '<|eot_id|>' }}{% endif %}{% endfor %}