mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-13 12:10:18 +00:00
5 lines
254 B
Django/Jinja
5 lines
254 B
Django/Jinja
{% for message in messages %}{% if (message['role'] == 'user') %}{{'<|user|>' + '
|
|
' + message['content'] + '<|end|>' + '
|
|
' + '<|assistant|>' + '
|
|
'}}{% elif (message['role'] == 'assistant') %}{{message['content'] + '<|end|>' + '
|
|
'}}{% endif %}{% endfor %} |