Installation
Install the OpenAI package:Setup
Set your OpenAI API key as an environment variable:Initialize Model
Create an OpenAI model instance. You can use eitherOpenAIChat or OpenAIResponse:
Use with Agent
Pass the model to your agent. BothOpenAIChat and OpenAIResponse work the same way:
Configuration Options
Supported parameters for OpenAI models. BothOpenAIChat and OpenAIResponse support the same parameters:
For the full list of available models and parameters, see the OpenAI API documentation.