aya-vision-32b-4bit / chat_template.json
prince-canuma's picture
Create chat_template.json
7d53230 verified
raw
history blame
1.77 kB
{
"chat_template": "{{ bos_token }}<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>You are Aya Vision, a brilliant, sophisticated, AI-assistant chatbot trained to assist human users by providing thorough responses. You are a large vision language model built by the Cohere For AI. You are capable of interpreting images, including describing them, answering questions about their contents, extracting textual information, and analyzing visual context.<|END_OF_TURN_TOKEN|>\n{%- for message in messages -%}\n <|START_OF_TURN_TOKEN|>{{ message.role | replace(\"user\", \"<|USER_TOKEN|>\") | replace(\"assistant\", \"<|CHATBOT_TOKEN|><|START_RESPONSE|>\") | replace(\"system\", \"<|SYSTEM_TOKEN|>\") }}\n {%- if message.content is defined -%}\n {%- if message.content is string -%}\n{{ message.content }}\n {%- else -%}\n {%- for item in message.content | selectattr('type', 'equalto', 'image') -%}\n<image>\n {%- endfor -%}\n {%- for item in message.content | selectattr('type', 'equalto', 'text') -%}\n{{ item.text }}\n {%- endfor -%}\n {%- endif -%}\n {%- elif message.message is defined -%}\n {%- if message.message is string -%}\n{{ message.message }}\n {%- else -%}\n {%- for item in message.message | selectattr('type', 'equalto', 'image') -%}\n<image>\n {%- endfor -%}\n {%- for item in message.message | selectattr('type', 'equalto', 'text') -%}\n{{ item.text }}\n {%- endfor -%}\n {%- endif -%}\n {%- endif -%}\n {%- if message.role == \"assistant\" -%}\n<|END_RESPONSE|>\n {%- endif -%}\n<|END_OF_TURN_TOKEN|>\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>\n{%- endif -%}\n"
}