Mephastophilis commited on
Commit
0a27da1
·
verified ·
1 Parent(s): a07cc9a

moving im_end token in system message

Browse files

Currently the system message only has `<|im_end|>` appended to the end if the tools argument is passed to the `apply_chat_template` method, because the token is placed within the `if xml_tools or python_tools or tools` logic. This should be moved after the `{%- endif -%}` statement so that it will always be appended to the end of the system message.

Files changed (1) hide show
  1. chat_template.jinja +1 -1
chat_template.jinja CHANGED
@@ -64,8 +64,8 @@
64
  {{- python_tool_string -}}
65
  {%- endif -%}
66
  {{- "\n\n" -}}
67
- {{- "<|im_end|>\n" -}}
68
  {%- endif -%}
 
69
  {%- endif -%}
70
  {# ───── main loop ───── #}
71
  {%- for message in messages -%}
 
64
  {{- python_tool_string -}}
65
  {%- endif -%}
66
  {{- "\n\n" -}}
 
67
  {%- endif -%}
68
+ {{- "<|im_end|>\n" -}}
69
  {%- endif -%}
70
  {# ───── main loop ───── #}
71
  {%- for message in messages -%}