34B

2 Pulls Updated 5 days ago

b8759771b06b · 739B
{{- if .System }} <|im_start|>system {{ .System }}<|im_end|> {{- end }} {{- range .Messages }} {{- if eq .Role "user" }} <|im_start|>user {{ .Content }}<|im_end|> {{- else if eq .Role "assistant" }} <|im_start|>assistant {{ if .Content }}{{ .Content }}{{ else if .ToolCalls }} I need to use some tools to answer your question accurately. Let me do that for you. {{- range .ToolCalls }} Using tool: {{ .Function.Name }} Arguments: {{ json .Function.Arguments }} {{- end }} {{ end }}<|im_end|> {{- else if eq .Role "tool" }} <|im_start|>tool Tool: {{ .Name }} Result: {{ .Content }}<|im_end|> {{- end }} {{- end }} {{- if .Prompt }} <|im_start|>user {{ .Prompt }}<|im_end|> <|im_start|>assistant {{- end }}