Use built-in tools like web search and file search to extend the model’s capabilities.
tools
parameter. Each tool has its own unique configuration requirements—see the Available tools section for detailed instructions.
Based on the provided prompt, the model automatically decides whether to use a configured tool. For instance, if your prompt requests information beyond the model’s training cutoff date and web search is enabled, the model will typically invoke the web search tool to retrieve relevant, up-to-date information.
You can explicitly control or guide this behavior by setting the tool_choice
parameter in the API request.
tools
array. These custom functions allow the model to call your application’s code, enabling access to specific data or capabilities not directly available within the model.
Learn more in the function calling guide.