openai
function configures OpenAI as your model provider.
Configuration
Theopenai
function accepts a model name string or a configuration object:
Options
ID of the model to use. See the model endpoint
compatibility
table for details on which models work with the Chat API.
The OpenAI API key to use for authenticating your request. By default we’ll
search for and use the
OPENAI_API_KEY
environment variable.The base URL for the OpenAI API.
The default parameters to use for the model (ex:
temperature
, max_tokens
,
etc).Available Models
OpenAI