Saltar para o conteúdo principal
The Responses API Beta suporta full Tool Calling capabilities, allowing the model to:
  • Function Calling
  • Execute multiple tools in parallel
  • Handle complex multi-step workflows

Basic Tool Definition

Request Header

Corpo da Requisição

Tool Invocation Strategy

The tool_choice parameter controls when and how the model invokes tools.

Multiple Tool Definitions

In complex tasks, multiple tools can be defined, allowing the model to escolha the appropriate tool based on user needs.

Response with Tool Invocation

Usage Recommendations

  1. Clear Descriptions: Provide detailed function descriptions and parameter explanations.
  2. Correct Format: Parameters should use valid JSON.
  3. Error Handling: Handle situations where tools may not be callable.
  4. Parallel Execution: Design tools to run independently whenever possible.
  5. Conversational Flow: Include tool responses in subsequent requests to provide context.

Última atualização: 2026-06-01