- Function Calling
- Execute multiple tools in parallel
- Handle complex multi-step workflows
Basic Tool Definition
Request Header
Request Body
Tool Invocation Strategy
Thetool_choice parameter controls when and how the model invokes tools.
| Parameter | Description |
|---|---|
| auto | The model automatically decides whether to invoke tools |
| none | Prevents the model from invoking any tools |
Multiple Tool Definitions
In complex tasks, multiple tools can be defined, allowing the model to choose the appropriate tool based on user needs.Response with Tool Invocation
Usage Recommendations
- Clear Descriptions: Provide detailed function descriptions and parameter explanations.
- Correct Format: Parameters should use valid JSON.
- Error Handling: Handle situations where tools may not be callable.
- Parallel Execution: Design tools to run independently whenever possible.
- Conversational Flow: Include tool responses in subsequent requests to provide context.
Last updated: 2026-06-01