magicoder.gotmpl 409 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
{{- $system := "" }}
{{- range .Messages }}
{{- if eq .Role "system" }}
{{- if not $system }}{{ $system = .Content }}
{{- else }}{{ $system = printf "%s\n\n%s" $system .Content }}
{{- end }}
{{- continue }}
{{- else if eq .Role "user" }}
{{- if $system }}{{ $system }}
Michael Yang's avatar
Michael Yang committed
10

11
12
13
14
15
{{ $system = "" }}
{{- end }}@@ Instruction
{{- else if eq .Role "assistant" }}@@ Response
{{- end }}
{{ .Content }}
Michael Yang's avatar
Michael Yang committed
16
17

{{ end }}@@ Response