FROM gemma3:12b PARAMETER num_ctx 128000 PARAMETER temperature 0.1 PARAMETER stop "" TEMPLATE """ {{- 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: {"name": "function_name", "parameters": {"param1": "value1"}} {{- end }} {{- end }} {{- range $i, $_ := .Messages }} {{- $last := eq (len (slice $.Messages $i)) 1 }} {{- if eq .Role "user" }}user {{ .Content }} {{- if $last }}model {{ end }} {{- else if eq .Role "system" }}user {{ .Content }} {{- if $last }}model {{ end }} {{- else if eq .Role "assistant" }}model {{- if .ToolCalls }} {{- range .ToolCalls }} {"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}} {{- end }} {{- else }} {{ .Content }} {{- end }} {{- if not $last }} {{ end }} {{- else if eq .Role "tool" }} {{ .Content }} {{- if and $last (ne .Role "assistant") }}model {{- end }} {{- end }} {{- end }} {{- else }} {{- if .System }} {{ .System }} {{- end }} {{- if .Prompt }} user {{ .Prompt }} model {{- end }} {{ .Response }} {{- if .Response }}{{ end }} {{- end }} """