update templates to use messages

This commit is contained in:
Michael Yang
2024-08-27 11:34:30 -07:00
parent 69be940bf6
commit 413ae39f3c
19 changed files with 145 additions and 84 deletions

View File

@@ -1,3 +1,6 @@
[INST] {{ if .System }}{{ .System }}
[INST] {{ range $index, $_ := .Messages }}
{{- if eq .Role "system" }}{{ .Content }}
{{ end }}{{ .Prompt }}[/INST] {{ .Response }}</s>
{{ else if eq .Role "user" }}{{ .Content }}[/INST]
{{- else if eq .Role "assistant" }} {{ .Content }}</s>[INST] {{ end }}
{{- end }}