mistral-instruct.gotmpl 384 B

123456789
  1. {{- if .Messages }}
  2. {{- range $index, $_ := .Messages }}
  3. {{- if eq .Role "user" }}[INST] {{ if and $.System (eq (len (slice $.Messages $index)) 1) }}{{ $.System }}
  4. {{ end }}{{ .Content }}
  5. {{- else if eq .Role "assistant" }}[/INST] {{ .Content }}</s>
  6. {{- end }}
  7. {{- end }}[/INST]
  8. {{- else }}[INST] {{ if .System }}{{ .System }} {{ end }}{{ .Prompt }} [/INST] {{ .Response }}
  9. {{- end }}