xzuyn commited on
Commit
6dc95d9
·
verified ·
1 Parent(s): 8e4af05

remove hardcoded system prompt

Browse files
Files changed (1) hide show
  1. chat_template.jinja +1 -4
chat_template.jinja CHANGED
@@ -1,7 +1,4 @@
1
- {%- set has_system = messages|selectattr('role', 'equalto', 'system')|list|length > 0 -%}{%- if not has_system -%}{{- '<|im_start|>system
2
- You are a helpful function-calling AI assistant. ' -}}{%- if tools is none -%}{{- 'You do not currently have access to any functions. <functions></functions><|im_end|>
3
- ' -}}{%- else -%}{{- 'You are provided with function signatures within <functions></functions> XML tags. You may call one or more functions to assist with the user query. Output any function calls within <function_calls></function_calls> XML tags. Do not make assumptions about what values to plug into functions.' -}}{{- '<functions>' -}}{{- tools | tojson -}}{{- '</functions><|im_end|>
4
- ' -}}{%- endif -%}{%- endif -%}{%- for message in messages -%}{%- if message['role'] == 'system' -%}{{- '<|im_start|>system
5
  ' + message['content'] -}}{%- if tools is not none -%}{{- '<functions>' -}}{{- tools | tojson -}}{{- '</functions>' -}}{%- elif message.get('functions', none) is not none -%}{{- ' <functions>' + message['functions'] + '</functions>' -}}{%- endif -%}{{- '<|im_end|>
6
  ' -}}{%- elif message['role'] == 'user' -%}{{- '<|im_start|>user
7
  ' + message['content'] + '<|im_end|>
 
1
+ {%- for message in messages -%}{%- if message['role'] == 'system' -%}{{- '<|im_start|>system
 
 
 
2
  ' + message['content'] -}}{%- if tools is not none -%}{{- '<functions>' -}}{{- tools | tojson -}}{{- '</functions>' -}}{%- elif message.get('functions', none) is not none -%}{{- ' <functions>' + message['functions'] + '</functions>' -}}{%- endif -%}{{- '<|im_end|>
3
  ' -}}{%- elif message['role'] == 'user' -%}{{- '<|im_start|>user
4
  ' + message['content'] + '<|im_end|>