feature: add

This commit is contained in:
2025-08-27 16:52:53 +08:00
parent 62f765bf4b
commit b9e9a99423
2 changed files with 84 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{% for m in messages %}
{% if m['role'] == 'system' %}{{ bos_token }}<|system|>
{{ m['content'] }}
<|end|>
{% elif m['role'] == 'user' %}{{ bos_token }}<|user|>
{{ m['content'] }}
<|end|>
{% elif m['role'] == 'assistant' %}{{ bos_token }}<|assistant|>
{{ m['content'] }}
<|end|>
{% endif %}
{% endfor %}
{% if add_generation_prompt %}{{ bos_token }}<|assistant|>
{% endif %}