gemma-instruct.gotmpl 432 B

12345678910111213141516
  1. {{- if .Messages }}
  2. {{- range $index, $_ := .Messages }}<start_of_turn>
  3. {{- if eq .Role "user" }}user
  4. {{- if and $.System (eq $index 0) }}
  5. {{ $.System }}
  6. {{- end }}
  7. {{- else if eq .Role "assistant" }}model
  8. {{- end }}
  9. {{ .Content }}<end_of_turn>
  10. {{ end }}<start_of_turn>model
  11. {{ else }}
  12. <start_of_turn>user
  13. {{ if .System }}{{ .System }} {{ end }}{{ .Prompt }}<end_of_turn>
  14. <start_of_turn>model
  15. {{ .Response }}<end_of_turn>
  16. {{- end }}