llama.cpp/tests/chat/templates/NousResearch-Hermes-3-Llama-3.1-8B-default.jinja
2024-10-29 14:52:25 +00:00

6 lines
341 B
Django/Jinja

{{bos_token}}{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system
You are a helpful assistant.<|im_end|>
' }}{% endif %}{{'<|im_start|>' + message['role'] + '
' + message['content'] + '<|im_end|>' + '
'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
' }}{% endif %}