Image-Text-to-Text
Transformers
ONNX
Safetensors
English
idefics3
conversational
SmolVLM-Instruct / chat_template.json
arjhinety's picture
Chat template: render string `content` instead of dropping it
c8e6bed verified
Raw History Blame
516 Bytes
{
"chat_template": "<|im_start|>{% for message in messages %}{{message['role'] | capitalize}}{% if message['content'] is string %}{{': ' + message['content']}}{% else %}{% 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 %}{% endif %}<end_of_utterance>\n{% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}"
}