mirror of
https://github.com/acon96/home-llm.git
synced 2026-01-08 21:28:05 -05:00
11 lines
505 B
Go Template
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|> |