21 lines
No EOL
366 B
Go Template
21 lines
No EOL
366 B
Go Template
{{- if .Messages }}
|
|
{{- if .System }}{{ .System }}
|
|
|
|
{{ end }}
|
|
{{- range .Messages }}
|
|
{{- if eq .Role "user" }}@@ Instruction
|
|
{{- else if eq .Role "assistant" }}@@ Response
|
|
{{- end }}
|
|
{{ .Content }}
|
|
|
|
{{ end }}@@ Response
|
|
{{ else -}}
|
|
{{ if .System }}{{ .System }}
|
|
|
|
{{ end }}{{ if .Prompt }}@@ Instruction
|
|
{{ .Prompt }}
|
|
|
|
{{ end }}@@ Response
|
|
{{ .Response }}
|
|
|
|
{{ end -}} |