A family of open foundation models by IBM for Code Intelligence

3b 8b 20b 34b

146.8K 2 months ago

977871d28ce4 · 679B
{{ if .Suffix }}<fim_prefix> {{ .Prompt }}<fim_suffix> {{ .Suffix }}<fim_middle>
{{- else if .Messages }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 }}
{{- if eq .Role "user" }}Question:
{{ .Content }}
{{ if $last }}Answer:
{{ end }}
{{- else if eq .Role "assistant" }}Answer:
{{ .Content }}{{ if not $last }}
{{ end }}
{{- else if eq .Role "system" }}System:
{{ .Content }}
{{ if $last }}Answer:
{{ end }}
{{- end }}
{{- end }}
{{- else }}
{{- if .System }}System:
{{ .System }}
{{ end }}
{{- if .Prompt }}Question:
{{ .Prompt }}
{{ end }}
{{- if .Response }}Answer:
{{ .Response }}
{{ else }}Answer:
{{ end }}
{{- end }}{{ .Response }}