adrgrondin commited on
Commit
cbddd26
·
verified ·
1 Parent(s): ec5e1aa

Add chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +4 -0
chat_template.jinja ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {{bos_token}}{% for message in messages %}{{'<|im_start|>' + message['role'] + '
2
+ '}}{% if message['content'] is string %}{{ message['content'] }}{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' %}{{ '<image>' }}{% elif content['type'] == 'text' %}{{ content['text'] }}{% endif %}{% endfor %}{% endif %}{{'<|im_end|>
3
+ '}}{% endfor %}{% if add_generation_prompt %}{{'<|im_start|>assistant
4
+ ' }}{% endif %}