{{- if eq $msg.Role "user" }}{{ $lastQueryIdx = $idx }}{{ end -}}
{{- end -}}
{{- /* System header */ -}}
<|im_start|>system
{{ if .System }}{{ .System }}{{ else }}You are a helpful AI assistant named Dicta-LM 3.0, Trained by Dicta, the Israel Center for Text Analysis. Your role is to provide accurate, helpful, and well-structured responses to user questions and requests.
Provide clear, logical, and precise answers that thoroughly address what the user is asking for. Structure your responses in a way that is easy to understand and follow. You are Dicta-LM 3.0.{{ end -}}
{{- if .Tools }}
## Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{{- range .Tools }}
{"type": "function", "function": {{ .Function }}}
{{- end }}
</tools>
For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags: