vericava commited on
Commit
eb99065
·
verified ·
1 Parent(s): abd5215

Update chat_template.jinja

Browse files
Files changed (1) hide show
  1. chat_template.jinja +1 -4
chat_template.jinja CHANGED
@@ -5,9 +5,6 @@
5
  {%- if not tools_in_user_message is defined %}
6
  {%- set tools_in_user_message = true %}
7
  {%- endif %}
8
- {%- if not tools is defined %}
9
- {%- set tools = none %}
10
- {%- endif %}
11
  {#- This block extracts the system message, so we can slot it into the right place. #}
12
  {%- if messages[0]['role'] == 'system' %}
13
  {%- set system_message = messages[0]['content']|trim %}
@@ -34,7 +31,7 @@
34
  {{- system_message }}
35
  {{- "<|eot_id|>" }}
36
  {#- Custom tools are passed in a user message with some extra guidance #}
37
- {%- if tools_in_user_message and not tools is none %}
38
  {#- Extract the first user message so we can plug it in here #}
39
  {%- if messages | length != 0 %}
40
  {%- set first_user_message = messages[0]['content']|trim %}
 
5
  {%- if not tools_in_user_message is defined %}
6
  {%- set tools_in_user_message = true %}
7
  {%- endif %}
 
 
 
8
  {#- This block extracts the system message, so we can slot it into the right place. #}
9
  {%- if messages[0]['role'] == 'system' %}
10
  {%- set system_message = messages[0]['content']|trim %}
 
31
  {{- system_message }}
32
  {{- "<|eot_id|>" }}
33
  {#- Custom tools are passed in a user message with some extra guidance #}
34
+ {%- if tools is defined %}
35
  {#- Extract the first user message so we can plug it in here #}
36
  {%- if messages | length != 0 %}
37
  {%- set first_user_message = messages[0]['content']|trim %}