mirror of
https://github.com/ollama/ollama.git
synced 2025-03-29 19:22:16 +01:00
15 lines
332 B
Go Template
15 lines
332 B
Go Template
{{- if .Messages }}
|
|
{{- if .System }}<|system|>
|
|
{{ .System }}<|end|>
|
|
{{ end }}
|
|
{{- range .Messages }}<|{{ .Role }}|>
|
|
{{ .Content }}<|end|>
|
|
{{ end }}<|assistant|>
|
|
{{ else }}
|
|
{{ if .System }}<|system|>
|
|
{{ .System }}<|end|>
|
|
{{ end }}{{ if .Prompt }}<|user|>
|
|
{{ .Prompt }}<|end|>
|
|
{{ end }}<|assistant|>
|
|
{{ .Response }}<|end|>
|
|
{{- end }} |