{{- if .Messages }} {{- range $index, $_ := .Messages }} {{- if eq .Role "user" }}user {{- if and $.System (eq $index 0) }} {{ $.System }} {{- end }} {{- else if eq .Role "assistant" }}model {{- end }} {{ .Content }} {{ end }}model {{ else }} user {{ if .System }}{{ .System }} {{ end }}{{ .Prompt }} model {{ .Response }} {{- end }}