Models
Docs
Pricing
Sign in
Download
Models
Download
Docs
Pricing
Sign in
brnpistone
/
NVIDIA-Nemotron-3-Nano-30-AgentCoder-q5-k-m
:latest
22
Downloads
Updated
2 weeks ago
Cancel
tools
thinking
NVIDIA-Nemotron-3-Nano-30-AgentCoder-q5-k-m:latest
...
/
template
076425b090a0 · 2.2kB
{{- $lastUserIdx := -1 -}}
{{- range $idx, $msg := .Messages -}}
{{- if eq $msg.Role "user" }}{{ $lastUserIdx = $idx }}{{ end -}}
{{- end }}
{{- if or .System .Tools }}<|im_start|>system
{{ if .System }}{{ .System }}{{ end }}
{{- if .Tools }}
# Tools
You have access to the following functions:
<tools>
{{- range .Tools }}
<function>
<name>{{ .Function.Name }}</name>
<description>{{ .Function.Description }}</description>
<parameters>{{ .Function.Parameters }}</parameters>
</function>
{{- end }}
</tools>
If you choose to call a function ONLY reply in the following format with NO suffix:
<tool_call>
<function=example_function_name>
<parameter=example_parameter_1>
value_1
</parameter>
<parameter=example_parameter_2>
This is the value for the second parameter
that can span
multiple lines
</parameter>
</function>
</tool_call>
<IMPORTANT>
Reminder:
- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
- Required parameters MUST be specified
- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
</IMPORTANT>
{{- end -}}
<|im_end|>
{{ end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 -}}
{{- if eq .Role "user" }}<|im_start|>user
{{ .Content }}<|im_end|>
{{ else if eq .Role "assistant" }}<|im_start|>assistant
{{ if (and $.IsThinkSet (and .Thinking (or $last (gt $i $lastUserIdx)))) -}}
<think>
{{ .Thinking }}
</think>
{{ else -}}
<think></think>
{{- end }}
{{- if .Content }}{{ .Content }}{{ end }}
{{- if .ToolCalls }}
{{- range .ToolCalls }}
<tool_call>
<function={{ .Function.Name }}>
{{- range $name, $value := .Function.Arguments }}
<parameter={{ $name }}>
{{ $value }}
</parameter>
{{- end }}
</function>
</tool_call>
{{- end }}
{{- end }}{{ if not $last }}<|im_end|>
{{ end }}
{{- else if eq .Role "tool" }}<|im_start|>user
<tool_response>
{{ .Content }}
</tool_response><|im_end|>
{{ end }}
{{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
<think>
{{ end }}
{{- end }}