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

