m8than commited on
Commit
993e4f1
·
verified ·
1 Parent(s): 100b932

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +1 -6
chat_template.jinja CHANGED
@@ -15,9 +15,6 @@
15
  {%- set loop_messages = messages -%}
16
  {%- endif -%}
17
  {%- for message in loop_messages -%}
18
- {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
19
- {{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
20
- {%- endif -%}
21
  {%- if (message['role'] == 'assistant') -%}
22
  {%- set role = "model" -%}
23
  {%- else -%}
@@ -35,8 +32,6 @@
35
  {{ item['text'] | trim }}
36
  {%- endif -%}
37
  {%- endfor -%}
38
- {%- else -%}
39
- {{ raise_exception("Invalid content type") }}
40
  {%- endif -%}
41
  {{ '<end_of_turn>
42
  ' }}
@@ -44,4 +39,4 @@
44
  {%- if add_generation_prompt -%}
45
  {{'<start_of_turn>model
46
  '}}
47
- {%- endif -%}
 
15
  {%- set loop_messages = messages -%}
16
  {%- endif -%}
17
  {%- for message in loop_messages -%}
 
 
 
18
  {%- if (message['role'] == 'assistant') -%}
19
  {%- set role = "model" -%}
20
  {%- else -%}
 
32
  {{ item['text'] | trim }}
33
  {%- endif -%}
34
  {%- endfor -%}
 
 
35
  {%- endif -%}
36
  {{ '<end_of_turn>
37
  ' }}
 
39
  {%- if add_generation_prompt -%}
40
  {{'<start_of_turn>model
41
  '}}
42
+ {%- endif -%}