Falcon 3 10b for tool usage and function call
tools
41 Pulls Updated 3 months ago
0eaa44b6648c · 1.2kB
{{ if .Messages }}
{{- if or .System .Tools }}system
{{ .System }}
{{- if .Tools }}
# Tools
You are provided with function signatures within <tools></tools> XML tags. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions. Here are the available tools:
<tools>{{- range .Tools }}{{ .Function }}{{- end }}</tools>
For each function call, return a JSON object with function name and arguments within <tool_call></tool_call> XML tags as follows:
<tool_call>
{"name": <function-name>, "arguments": <args-json-object>}
</tool_call>{{- end }}{{- end }}
{{- range .Messages }}
{{- if eq .Role "user" }}
{{ .Role }}
{{ .Content }}
{{- else if eq .Role "assistant" }}
{{ .Role }}
{{- if .Content }}
{{ .Content }}
{{- end }}
{{- if .ToolCalls }}
<tool_call>
{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
{{ end }}</tool_call>
{{- end }}
{{- else if eq .Role "tool" }}
User:
<tool_response>
{{ .Content }}
</tool_response>
{{- end }}
{{- end }}
Assistant:
{{ else }}{{ if .System }}System:
{{ .System }}
{{ end }}{{ if .Prompt }}User: {{ .Prompt }}
{{ end }}
Assistant:
{{ end }}