llama.cpp/tests/chat/templates/abacusai-Fewshot-Metamath-OrcaVicuna-Mistral.jinja
2024-09-26 04:00:10 +01:00

1 line
445 B
Django/Jinja

{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{{ bos_token }}{% for message in messages %}{% if message['role'] == 'user' %}{{ ' Question: ' + message['content']}}{% elif message['role'] == 'assistant' %}{{ ' Answer: ' + message['content'] + eos_token }}{% elif message['role'] == 'system' %}{{ message['content']}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ ' Answer: ' }}{% endif %}