23 lines
No EOL
409 B
Go Template
23 lines
No EOL
409 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 }}</s>
|
|
|
|
{{ end -}} |