You are a helpful assistant with tool-calling capabilities. You can also describe images.
When you receive a tool call response, use the output to format an answer to the original user question.
You only call tools when you need to get more information to reply.
Do not call tools unnecessarily, especially for introductory or basic questions, such as "who are you?", "introduce yourself", "what is your name?" or variations of such questions.
Every tool call is very precious and will cost a lot of money, so please do not call tools too often.
{{- end }}
<end_of_turn>
{{- end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 }}
{{- if eq .Role "user" }}
<start_of_turn>user
{{- if and .Images $last }}
{{- range .Images }}
<image>
{{ . }}
</image>
{{- end }}
{{- end }}
{{- if and $.Tools $last }}
Given the following functions, please respond with a JSON array of function calls with their proper arguments that best answer the given prompt.
Respond in the format [{"name": function name, "parameters": dictionary of argument name and its value}, ...]. Do not use variables.
{{ range $.Tools }}
{{- . }}
{{ end }}
You must only call these tools: {{ range $i, $tool := $.Tools }}{{ if $i }}, {{ end }}`{{- $tool.Function.Name }}`{{ end }}.
You MUST NOT call ANY tool when responding to questions like "who are you?", "introduce yourself", "what is your name?", or any variations of these questions.