OptionalapiOptionalaudioParameters for audio output. Required when audio output is requested with
modalities: ["audio"].
Learn more.
Penalizes repeated tokens according to frequency
OptionallogitDictionary used to adjust the probability of specific tokens being generated
OptionallogprobsWhether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
OptionalmaxMaximum number of tokens to generate in the completion. -1 returns as many
tokens as possible given the prompt and the model's maximum context size.
Alias for maxTokens for reasoning models.
OptionalmaxMaximum number of tokens to generate in the completion. -1 returns as many tokens as possible given the prompt and the model's maximum context size.
OptionalmodalitiesOutput types that you would like the model to generate for this request. Most models are capable of generating text, which is the default:
["text"]
The gpt-4o-audio-preview model can also be used to
generate audio. To request that
this model generate both text and audio responses, you can use:
["text", "audio"]
Model name to use
OptionalmodelHolds any additional parameters that are valid to pass to openai.createCompletion that are not explicitly specified on this class.
Model name to use
Alias for model
API key to use when making requests to OpenAI. Defaults to the value of
OPENAI_API_KEYenvironment variable.