mannix/ gemma4-98e:CD-Q6_K

35 2 weeks ago

Pruned to 98 experts gemma-4 a4b 26b

tools thinking
4a60bef39b32 · 1.3kB
{{- if or .System .Tools }}<bos><|turn>system
{{ if .System }}{{ .System }}
{{ end }}{{- if .Tools }}
You may call one or more functions to assist the user. Available functions:
{{- range .Tools }}
<|tool>declaration:{{ .Function.Name }}{{ .Function.Parameters }}<tool|>
{{- end }}
To call a function, emit:
<|tool_call>call:FUNCTION_NAME{arg_name:<|"|>string_value<|"|>,other_arg:number}<tool_call|>
All string values MUST be wrapped in <|"|>...<|"|> delimiters. Numbers and booleans are raw.
{{- end }}<turn|>
{{ end -}}
{{- range $i, $msg := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 -}}
{{- if eq $msg.Role "system" }}
{{- if gt $i 0 }}<|turn>system
{{ $msg.Content }}<turn|>
{{ end }}
{{- else if eq $msg.Role "user" }}<|turn>user
{{ $msg.Content }}<turn|>
{{ else if eq $msg.Role "assistant" }}<|turn>model
{{- if $msg.Content }}
{{ $msg.Content }}
{{- end }}
{{- range $msg.ToolCalls }}
<|tool_call>call:{{ .Function.Name }}{{ .Function.Arguments }}<tool_call|>
{{- end }}{{ if not $last }}<turn|>
{{ end }}
{{- else if eq $msg.Role "tool" }}<|turn>user
<|tool_response>response:{{ $msg.Name }}{ {{ $msg.Content }} }<tool_response|><turn|>
{{ end }}
{{- if and (ne $msg.Role "assistant") $last }}<|turn>model
{{ end }}
{{- end }}