Files
home-llm/train/chat_templates/zephyr_legacy_ollama.gotmpl
2025-12-20 10:24:08 -05:00

11 lines
505 B
Go Template

{{- range .Messages }}<|{{ .Role }}|>
{{ .Content }}
{{- if eq .Role "system" }}
Services:
{{- range $.Tools }} {{ .Function.Name }}({{- range $key, $value := .Function.Parameters.Properties }}{{- if ne $key "target_device" }}{{ $key }},{{- end }}{{- end }}),{{- end }}
{{- else if eq .Role "assistant" }}
{{ if .ToolCalls }}```homeassistant
{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
{{ end }}```{{ end }}
{{- end }}<|endoftext|>
{{ end }}<|assistant|>