mikestaub/
apriel-1.5:15b-thinker-q4_k_m

224 2 weeks ago

source: https://huggingface.co/Disya/Apriel-1.5-15b-Thinker-Q4_K_M-GGUF

vision tools thinking
2780a891594a · 1.7kB
{{- if or .System .Tools }}<|system|>
{{- if .System }}
{{ .System }}
{{- end }}
{{- if .Tools }}
You are provided with function signatures within <available_tools></available_tools> XML tags. You may call one or more functions to assist with the user query. Don't make assumptions about the arguments. You should infer the argument values from previous user responses and the system message. Here are the available tools:
<available_tools>
{{ .Tools }}
</available_tools>
Return all function calls as a list of json objects within <tool_call></tool_call> XML tags. Each json object should contain a function name and arguments as follows:
<tool_calls>[{"name": <function-name-1>, "arguments": <args-dict-1>}, {"name": <function-name-2>, "arguments": <args-dict-2>},...]</tool_calls>
<|end|>
{{- end }}
{{- end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 -}}
{{- if eq .Role "user" }}<|user|>
{{ .Content }}
{{- end }}
{{- if eq .Role "assistant" }}<|assistant|>
{{ .Content }}
{{- if and $.IsThinkSet .Thinking }}<thinking>{{ .Thinking }}</thinking>{{ end -}}
{{- if .ToolCalls }}
<tool_calls>[{{ range .ToolCalls }}{"name":"{{ .Function.Name }}","arguments":{{ .Function.Arguments }}{{ end }}]</tool_calls>
{{- end }}
{{- end }}
{{- if false }}Here are my reasoning steps:
{{ .Thinking }}
[BEGIN FINAL RESPONSE]
{{ end }}
{{- if eq .Role "tool" }}<|tool_result|>
{{ .Content }}
<|end|>
{{ end }}
{{- if not $last }}<|end|>
{{- end }}
{{- if and (ne .Role "assistant") $last }}<|end|><|assistant|>
{{- if $.IsThinkSet }}
Here are my reasoning steps:
{{ if not $.Think }}
[BEGIN FINAL RESPONSE]
{{- end }}
{{- end }}
{{ end }}
{{- end -}}