xiaohei66 commited on
Commit
9af68d3
·
verified ·
1 Parent(s): 205bc88

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +7 -23
chat_template.jinja CHANGED
@@ -1,25 +1,9 @@
1
  {% set system_query = 'You should follow the instructions carefully and explain your answers in detail.' %}
2
- {% set default_query = 'Chart to table' %}
3
  {% set num_patches = 16 %}
4
- <|im_start|>system\n{{ system_query }}<|im_end|>
5
- {%- for message in messages -%}
6
- {%- if message['role'] == 'user' -%}
7
- <|im_start|>user\n
8
- {%- set user_content = message.get('content', []) | default([]) -%}
9
- <img>
10
- {%- set num_pad = num_patches * num_patches -%}
11
- {%- for i in range(num_pad) -%}
12
- <imgpad>
13
- {%- endfor -%}
14
- </img>
15
- {{ default_query }}
16
- <|im_end|>
17
- {%- elif message['role'] == 'assistant' -%}
18
- <|im_start|>assistant\n
19
- {{- message.get('content', '') -}}
20
- <|im_end|>
21
- {%- endif -%}
22
- {%- endfor -%}
23
- {%- if add_generation_prompt -%}
24
- <|im_start|>assistant\n
25
- {%- endif -%}
 
1
  {% set system_query = 'You should follow the instructions carefully and explain your answers in detail.' %}
 
2
  {% set num_patches = 16 %}
3
+ <|im_start|>system
4
+ {{ system_query }}<|im_end|>{% for message in messages %}{% if message['role'] == 'user' %}<|im_start|>user
5
+ <img>{% for _ in range(num_patches * num_patches) %}<imgpad>{% endfor %}</img>
6
+
7
+ Chart to table<|im_end|>{% elif message['role'] == 'assistant' %}<|im_start|>assistant
8
+ {{ message.get('content', '') }}<|im_end|>{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
9
+ {% endif %}