Adding system block with "detailed thinking off" even when system role not present in messages (#3)
Browse files- Adding system block with "detailed thinking off" even when system role not present in messages (d30e510e341438e633622f91bb8131368c5dc3b1)
Co-authored-by: Ameya Sunil Mahabaleshwarkar <[email protected]>
llama_nemotron_nano_generic_tool_calling.jinja
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
{%- if tools %}
|
| 2 |
{{- '<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n' -}}
|
| 3 |
-
{%- if messages[0].role == 'system' -%}
|
| 4 |
{{- messages[0].content + '\n\n' -}}
|
|
|
|
|
|
|
| 5 |
{%- endif -%}
|
| 6 |
{{- '<AVAILABLE_TOOLS>[' -}}
|
| 7 |
{%- for tool in tools -%}
|
|
@@ -9,9 +11,13 @@
|
|
| 9 |
{%- endfor -%}
|
| 10 |
{{- ']</AVAILABLE_TOOLS>' -}}{{- '<|eot_id|>' -}}
|
| 11 |
{%- else %}
|
| 12 |
-
{
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
| 14 |
{%- endif %}
|
|
|
|
| 15 |
{%- endif %}
|
| 16 |
{%- for message in messages -%}
|
| 17 |
{%- if (message.role == 'user') -%}
|
|
|
|
| 1 |
{%- if tools %}
|
| 2 |
{{- '<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n' -}}
|
| 3 |
+
{%- if messages[0].role == 'system' and messages[0].content != '' -%}
|
| 4 |
{{- messages[0].content + '\n\n' -}}
|
| 5 |
+
{%- else -%}
|
| 6 |
+
{{- 'detailed thinking off\n\n' -}}
|
| 7 |
{%- endif -%}
|
| 8 |
{{- '<AVAILABLE_TOOLS>[' -}}
|
| 9 |
{%- for tool in tools -%}
|
|
|
|
| 11 |
{%- endfor -%}
|
| 12 |
{{- ']</AVAILABLE_TOOLS>' -}}{{- '<|eot_id|>' -}}
|
| 13 |
{%- else %}
|
| 14 |
+
{{- '<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n' -}}
|
| 15 |
+
{%- if messages[0].role == 'system' and messages[0].content != '' -%}
|
| 16 |
+
{{- messages[0].content -}}
|
| 17 |
+
{%- else -%}
|
| 18 |
+
{{- 'detailed thinking off' -}}
|
| 19 |
{%- endif %}
|
| 20 |
+
{{- '<|eot_id|>' -}}
|
| 21 |
{%- endif %}
|
| 22 |
{%- for message in messages -%}
|
| 23 |
{%- if (message.role == 'user') -%}
|