ollama/template/gemma-instruct.gotmpl

16 lines
432 B
Go Template
Raw Normal View History

2024-06-27 21:15:17 +00:00
{{- if .Messages }}
{{- range $index, $_ := .Messages }}<start_of_turn>
{{- if eq .Role "user" }}user
{{- if and $.System (eq $index 0) }}
{{ $.System }}
{{- end }}
{{- else if eq .Role "assistant" }}model
{{- end }}
{{ .Content }}<end_of_turn>
{{ end }}<start_of_turn>model
{{ else }}
2024-06-03 18:06:29 +00:00
<start_of_turn>user
{{ if .System }}{{ .System }} {{ end }}{{ .Prompt }}<end_of_turn>
<start_of_turn>model
2024-06-27 21:15:17 +00:00
{{ .Response }}<end_of_turn>
{{- end }}