danielhanchen commited on
Commit
1ab098e
·
verified ·
1 Parent(s): fecca0d

Update template

Browse files
Files changed (1) hide show
  1. template +3 -0
template CHANGED
@@ -10,6 +10,7 @@ Declare the system prompt chunks used for different features
10
  {{- $tools_system_message_suffix := "\n</tools>\n\nFor each tool call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request." }}
11
  {{- $documents_system_message_prefix := "You are a helpful assistant with access to the following documents. You may use one or more documents to assist with the user query.\n\nYou are given a list of documents within <documents></documents> XML tags:\n<documents>" }}
12
  {{- $documents_system_message_suffix := "\n</documents>\n\nWrite the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data." }}
 
13
 
14
  {{- /*
15
  Declare the prompt structure variables to be filled in from messages
@@ -111,6 +112,8 @@ Construct the full system message
111
  */}}
112
  {{- if ne $system_message "" -}}
113
  <|start_of_role|>system<|end_of_role|>{{ $system_message }}<|end_of_text|>{{ "\n" }}
 
 
114
  {{- end }}
115
  {{- $prev_role := "" }}
116
  {{- range $message_index, $_ := .Messages }}
 
10
  {{- $tools_system_message_suffix := "\n</tools>\n\nFor each tool call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request." }}
11
  {{- $documents_system_message_prefix := "You are a helpful assistant with access to the following documents. You may use one or more documents to assist with the user query.\n\nYou are given a list of documents within <documents></documents> XML tags:\n<documents>" }}
12
  {{- $documents_system_message_suffix := "\n</documents>\n\nWrite the response to the user's input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data." }}
13
+ {{- $default_system_message := "You are a helpful assistant. Please ensure responses are professional, accurate, and safe." }}
14
 
15
  {{- /*
16
  Declare the prompt structure variables to be filled in from messages
 
112
  */}}
113
  {{- if ne $system_message "" -}}
114
  <|start_of_role|>system<|end_of_role|>{{ $system_message }}<|end_of_text|>{{ "\n" }}
115
+ {{- else -}}
116
+ <|start_of_role|>system<|end_of_role|>{{ $default_system_message }}<|end_of_text|>{{ "\n" }}
117
  {{- end }}
118
  {{- $prev_role := "" }}
119
  {{- range $message_index, $_ := .Messages }}