File size: 714 Bytes
fa0bd64 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
{% set system_prompt = "<|begin_of_text|><|start_header_id|>system<|end_header_id|>
You are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language." %}
{% set roles = ["<|start_header_id|>user<|end_header_id|>
", "<|start_header_id|>assistant<|end_header_id|>
"] %}
{% set sep = "<|eot_id|>" %}
{% set sep2 = "<|end_of_text|>" %}
{{ system_prompt }}
{% for message in messages %}
{% if message['role'] == 'user' %}
{{ roles[0] }}{{ message['content'] }}{{ sep }}
{% else %}
{{ roles[1] }}{{ message['content'] }}{{ sep }}
{% endif %}
{% endfor %}
{{ sep2 }} |