vision

13 7 weeks ago

... /
template
977871d28ce4 · 679B
{{ if .Suffix }}<fim_prefix> {{ .Prompt }}<fim_suffix> {{ .Suffix }}<fim_middle>
{{- else if .Messages }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 }}
{{- if eq .Role "user" }}Question:
{{ .Content }}
{{ if $last }}Answer:
{{ end }}
{{- else if eq .Role "assistant" }}Answer:
{{ .Content }}{{ if not $last }}
{{ end }}
{{- else if eq .Role "system" }}System:
{{ .Content }}
{{ if $last }}Answer:
{{ end }}
{{- end }}
{{- end }}
{{- else }}
{{- if .System }}System:
{{ .System }}
{{ end }}
{{- if .Prompt }}Question:
{{ .Prompt }}
{{ end }}
{{- if .Response }}Answer:
{{ .Response }}
{{ else }}Answer:
{{ end }}
{{- end }}{{ .Response }}