magicoder.gotmpl 409 Bytes
Newer Older
xuxzh1's avatar
update  
xuxzh1 committed
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 }}
xuxzh1's avatar
init  
xuxzh1 committed
10

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

{{ end }}@@ Response