llama4:latest

637.9K 2 months ago

Meta's latest collection of multimodal models.

vision tools 16x17b 128x17b
8a13cf51fd9e · 1.1kB
{{- if .System }}<|header_start|>system<|header_end|>
{{ if .Tools }}Environment: ipython
You have access to the following functions. To call a function, please respond with JSON for a function call. Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}. Do not use variables.
{{ range .Tools }}{{ . }}
{{ end }}
{{- end }}{{ .System }}<|eot|>
{{- end }}
{{- range $i, $_ := .Messages }}
{{- if eq .Role "system" }}
{{- continue }}
{{- end }}
{{- if and (ne .Role "tool") (not .ToolCalls) }}<|header_start|>{{ .Role }}<|header_end|>
{{ .Content }}
{{- else if .ToolCalls }}<|header_start|><|python_start|>
{{- range .ToolCalls }}{"name": "{{ .Function.Name }}", "parameters": {{ .Function.Arguments }}}
{{- end }}<|python_end|><|eom|>
{{- continue }}
{{- else if or (eq .Role "tool") (eq .Role "ipython") }}<|header_start|>ipython<|header_end|>
{{ .Content }}
{{- end }}
{{- if eq (len (slice $.Messages $i)) 1 }}
{{- if ne .Role "assistant" }}<|eot|><|header_start|>assistant<|header_end|>
{{ end }}
{{- else }}<|eot|>
{{- end }}
{{- end }}