update named templates

This commit is contained in:
Michael Yang
2024-06-27 14:15:17 -07:00
parent 326363b3a7
commit fb6cbc02fb
75 changed files with 611 additions and 27 deletions

View File

@@ -1,3 +1,16 @@
{{- 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 }}
{{ .Prompt }} [/INST] {{ .Response }}
{{- end }}