| {% for m in messages %} | |
| <|im_start|>{{ m['role'] }} | |
| {% for piece in m['content'] %} | |
| {% if piece['type'] == 'text' %} | |
| {{ piece['text'] }} | |
| {% elif piece['type'] == 'audio' %} | |
| <|audio_start|><|audio_pad|><|audio_end|> | |
| {% elif piece['type'] == 'image' %} | |
| <image> | |
| {% elif piece['type'] == 'video' %} | |
| <video> | |
| {% endif %} | |
| {% endfor %}<|im_end|> | |
| {% endfor %} | |