Models
GitHub
Discord
Turbo
Sign in
Download
Models
Download
GitHub
Discord
Sign in
MFDoom
/
deepseek-r1-tool-calling
:8b
23.6K
Downloads
Updated
7 months ago
DeepSeek's first-generation of reasoning models with comparable performance to OpenAI-o1, including six dense models distilled from DeepSeek-R1 based on Llama and Qwen. With Tool Calling support.
DeepSeek's first-generation of reasoning models with comparable performance to OpenAI-o1, including six dense models distilled from DeepSeek-R1 based on Llama and Qwen. With Tool Calling support.
Cancel
tools
1.5b
7b
8b
14b
32b
70b
671b
deepseek-r1-tool-calling:8b
...
/
template
e835211bc0fb · 1.7kB
{{- if .Messages }}
{{- if or .System .Tools }}
{{- if .System }}
{{ .System }}
{{- end }}
{{- if .Tools }}
When using a tool, format as:
{"name": "function_name", "parameters": {"param1": "value1"}}
The following tools are available when needed for specific tasks:
{{ $.Tools }}
{{- end }}
{{- end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 }}
{{- if eq .Role "user" }}<|User|>
{{- if and $.Tools $last }}
Given the tools, please respond with a JSON object for a function call with its proper arguments that best answers the given prompt.
Prioritize specific concurrent tool calls over a single generic tool call. Use tools first, explain what happened after recieving the results.
Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.
{{- end }}
Question: {{ .Content }}
{{- if $last }}<|Assistant|>{{ end }}
{{- else if eq .Role "assistant" }}
<|Assistant|>
{{- if .ToolCalls }}
{{- range .ToolCalls }}
{"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}}
{{- end }}
{{- else }}
{{ .Content }}
{{- if not $last }}<|end▁of▁sentence|>{{- end }}
{{- end }}
{{- else if eq .Role "tool" }}<|end▁of▁sentence|><|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 }}