22 lines
No EOL
403 B
Go Template
22 lines
No EOL
403 B
Go Template
{{- if .Messages }}
|
|
{{- if .System }}### System:
|
|
{{ .System }}
|
|
|
|
{{ end }}
|
|
{{- range .Messages }}
|
|
{{- if eq .Role "user" }}### User:
|
|
{{ .Content }}
|
|
{{ else if eq .Role "assistant" }}### Assistant:
|
|
{{ .Content }}</s>
|
|
{{ end }}
|
|
{{ end }}### Assistant:
|
|
{{ else }}
|
|
{{ if .System }}### System:
|
|
{{ .System }}
|
|
|
|
{{ end }}{{ if .Prompt }}### User:
|
|
{{ .Prompt }}
|
|
|
|
{{ end }}### Assistant:
|
|
{{ .Response }}
|
|
{{- end }} |