19 lines
No EOL
374 B
Go Template
19 lines
No EOL
374 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 }} |