Skip to main content

Module request

Module request 

Source
Expand description

This module contains the request body and POST method for the chat completion API.

Structs§

AssistantAudio
Data about a previous audio response from the model, referenced in an assistant message for multi-turn audio conversations.
ChatCompletionAudioParam
Parameters for audio output of a chat completion.
ChatCompletionPredictionContentParam
JSONSchema
RequestBody
Creates a model response for the given chat conversation.
StreamOptions
ToolCallCustom
ToolCallFunction
ToolChoiceAllowedTools
ToolChoiceCustom
ToolChoiceFunction
ToolCustom
ToolCustomFormatGrammarGrammar
ToolFunction
WebSearchOptions
WebSearchOptionsUserLocationApproximate

Enums§

AssistantToolCall
AudioFormat
The output audio format of a chat completion.
ChatCompletionContentPartTextParamType
ChatCompletionPredictionContentParamContent
ChatCompletionPredictionContentParamType
LowMediumHighEnum
Message
Modality
ReasoningEffort
Constrains the effort on reasoning for reasoning models. This is an official OpenAI parameter; reasoning providers such as DeepSeek and Qwen accept a subset of these values and map the rest to their nearest effort level.
RequestTool
ResponseFormat
StopKeywords
ToolChoice
ToolChoiceAllowedToolsMode
The mode for allowed tools in tool choice.
ToolChoiceSpecific
ToolCustomFormat
ToolCustomFormatGrammarGrammarSyntax
Voice
The voice the model uses to respond with audio output.
WebSearchOptionsUserLocation