Update chat_template.jinja
Browse files- chat_template.jinja +2 -7
chat_template.jinja
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
{%- set current_date = now().strftime('%Y-%m-%d') %}
|
| 2 |
{%- set tools_system_message_prefix = 'You are a helpful assistant with access to the following tools. You may call one or more tools to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>' %}
|
| 3 |
{%- set 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.' %}
|
| 4 |
{%- set 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>' %}
|
|
@@ -59,12 +58,8 @@
|
|
| 59 |
{%- endif %}
|
| 60 |
|
| 61 |
{# Inject metadata and reasoning effort #}
|
| 62 |
-
{%- set ns.system_message = '<|start|>system<|message|>' + ns.system_message + '\nknowledge cutoff: 2024-06\nCurrent date: ' +
|
| 63 |
-
{%- if reasoning_effort is defined %}
|
| 64 |
-
{%- set ns.system_message = ns.system_message + '\nReasoning: ' + reasoning_effort %}
|
| 65 |
-
{%- else %}
|
| 66 |
-
{%- set ns.system_message = ns.system_message + '\nReasoning: no' %}
|
| 67 |
-
{%- endif %}
|
| 68 |
|
| 69 |
{%- if ns.system_message %}
|
| 70 |
{{- '<|start_of_role|>system<|end_of_role|>' + ns.system_message + '<|end_of_text|>\n' }}
|
|
|
|
|
|
|
| 1 |
{%- set tools_system_message_prefix = 'You are a helpful assistant with access to the following tools. You may call one or more tools to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>' %}
|
| 2 |
{%- set 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.' %}
|
| 3 |
{%- set 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>' %}
|
|
|
|
| 58 |
{%- endif %}
|
| 59 |
|
| 60 |
{# Inject metadata and reasoning effort #}
|
| 61 |
+
{%- set ns.system_message = '<|start|>system<|message|>' + ns.system_message + '\nknowledge cutoff: 2024-06\nCurrent date: ' + strftime_now("%Y-%m-%d") %}
|
| 62 |
+
{%- set ns.system_message = ns.system_message + '\nReasoning: ' + (reasoning_effort if reasoning_effort is defined else 'no') %}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
{%- if ns.system_message %}
|
| 65 |
{{- '<|start_of_role|>system<|end_of_role|>' + ns.system_message + '<|end_of_text|>\n' }}
|