Models
GitHub
Discord
Turbo
Sign in
Download
Models
Download
GitHub
Discord
Sign in
michaelneale
/
deepseek-r1-goose
:latest
4,823
Downloads
Updated
7 months ago
Tool calling for deepseek-r1, tweaked for the goose agent
Tool calling for deepseek-r1, tweaked for the goose agent
Cancel
tools
70b
deepseek-r1-goose:latest
...
/
template
ee0dd1fea5af · 1.6kB
{{- if .Messages }}
{{- if or .System .Tools }}
{{- if .System }}
{{ .System }}
{{- end }}
{{- if .Tools }}
The following tools are available when needed for specific tasks:
{{ .Tools }}
Only use tools when the task specifically requires their functionality.
For general questions or tasks that don't need external data, respond directly.
When using a tool, format as:
<|tool▁calls▁begin|>
<|tool▁call▁begin|>
{"name": "function_name", "parameters": {"param1": "value1"}}
<|tool▁call▁end|>
<|tool▁calls▁end|>
{{- end }}
{{- end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 }}
{{- if eq .Role "user" }}<|User|>
{{ .Content }}
{{- if $last }}<|Assistant|>{{ end }}
{{- else if eq .Role "assistant" }}
<|Assistant|>
{{- if .ToolCalls }}
<|tool▁calls▁begin|>
{{- range .ToolCalls }}
<|tool▁call▁begin|>
{"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}}
<|tool▁call▁end|>
{{- end }}
<|tool▁calls▁end|>
{{- else }}
{{ .Content }}
{{- if not $last }}<|end▁of▁sentence|>{{- end }}
{{- end }}
{{- else if eq .Role "tool" }}
<|tool▁outputs▁begin|>
<|tool▁output▁begin|>
{{ .Content }}
<|tool▁output▁end|>
<|tool▁outputs▁end|>
{{- if and $last (ne .Role "assistant") }}<|Assistant|>{{- end }}
{{- end }}
{{- end }}
{{- else }}
{{- if .System }}
{{ .System }}
{{- end }}
{{- if .Prompt }}
<|User|>
{{ .Prompt }}
{{- end }}
<|Assistant|>
{{ .Response }}
{{- if .Response }}{{ end }}
{{- end }}