Create template
Browse files
template
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{{- range $i, $_ := .Messages }}
|
2 |
+
{{- $last := eq (len (slice $.Messages $i)) 1 }}
|
3 |
+
{{- if or (eq .Role "user") (eq .Role "system") }}<start_of_turn>user
|
4 |
+
{{ .Content }}<end_of_turn>
|
5 |
+
{{ if $last }}<start_of_turn>model
|
6 |
+
{{ end }}
|
7 |
+
{{- else if eq .Role "assistant" }}<start_of_turn>model
|
8 |
+
{{ .Content }}{{ if not $last }}<end_of_turn>
|
9 |
+
{{ end }}
|
10 |
+
{{- end }}
|
11 |
+
{{- end }}
|