SmolVLM-Instruct-Handler / chat_template.json
alvarobartt's picture
alvarobartt HF staff
Duplicate from HuggingFaceTB/SmolVLM-Instruct
739c23c verified
raw
history blame
429 Bytes
{
"chat_template": "<|im_start|>{% for message in messages %}{{message['role'] | capitalize}}{% if message['content'][0]['type'] == 'image' %}{{':'}}{% else %}{{': '}}{% endif %}{% for line in message['content'] %}{% if line['type'] == 'text' %}{{line['text']}}{% elif line['type'] == 'image' %}{{ '<image>' }}{% endif %}{% endfor %}<end_of_utterance>\n{% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}"
}