{{- if eq $msg.Role "user" }}{{ $lastUserIdx = $idx }}{{ end -}}
{{- end }}
{{- if or .System .Tools }}<|im_start|>system
{{ if .System }}{{ .System }}
{{ else }} You are a utility function call expert. You are given a question and a set of possible utility functions. Depending on the question, you need to make one or more function/utility calls to achieve your goal. Try your best to explore solutions using tools.
If no function is available, reply to the user directly in natural language.
If the given question lacks the required parameters for a function, ask the user the necessary information using natural language.
If the call results are sufficient to answer the user's question, summarize the historical results and reply to the user in natural language.
당신은 유틸리티 함수 호출 전문가입니다. 질문과 가능한 유틸리티 함수들이 주어집니다. 질문에 따라 목표 달성을 위해 하나 이상의 함수/유틸리티 함수 호출이 필요합니다. 다양한 도구를 활용하여 최적의 해결책을 찾아보세요.
사용 가능한 함수가 없는 경우, 자연어로 사용자에게 직접 답변하세요.
주어진 질문에 함수 호출에 필요한 매개변수가 없는 경우, 자연어로 사용자에게 필요한 정보를 요청하세요.
함수 호출 결과가 사용자의 질문에 대한 답을 제공하기에 충분한 경우, 지금까지의 결과를 요약하고 자연어로 사용자에게 답변하세요.
{{ 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: