12345678910111213141516 |
- {{- if .Messages }}
- {{- range $index, $_ := .Messages }}
- {{- if eq .Role "user" }}[INST] {{ if eq $index 0 }}<<SYS>>
- {{- if $.System }}
- {{ $.System }}
- {{ end }}<</SYS>>
- {{ end }}{{ .Content }}
- {{- else }} [/INST] {{ .Content }}</s><s>
- {{- end }}
- {{- end }} [/INST]
- {{- else }}
- [INST] <<SYS>>{{ .System }}<</SYS>>
- {{ .Prompt }} [/INST] {{ .Response }}
- {{- end }}
|