All Classes and Interfaces
Class
Description
Single class implementation of the
OpenAI Chat Completion
API and OpenAI
Embedding API.
Represents a chat completion response returned by model, based on the provided
input.
Chat completion choice.
Represents a streamed chunk of a chat completion response returned by model, based
on the provided input.
Chat completion choice.
The reason the model stopped generating tokens.
Message comprising the conversation.
Represents an annotation within a message, specifically for URL citations.
A URL citation when using web search.
Audio response from the model.
The function definition.
An array of content parts with a defined type.
Shortcut constructor for an image content.
Constructor for base64-encoded file
The role of the author of this message.
The relevant tool call.
Creates a model request for the given chat conversation.
Parameters for audio output.
Specifies the output audio format.
Specifies the voice type.
Helper factory that creates a tool_choice of type 'none', 'auto' or selected function by name.
This tool searches the web for relevant results to use in a response.
High level guidance for the amount of context window space to use for the
search.
Approximate location parameters for the search.
OpenAI Chat Completion Models.
Represents an embedding vector returned by embedding endpoint.
List of multiple embedding responses.
OpenAI Embeddings Models:
Embeddings.
Creates an embedding vector representing the input text.
Represents a tool the model may call.
Function definition.
Create a tool of type 'function' and the given function definition.
Log probability information for the choice.
Message content tokens with log probability information.
The most likely tokens and their log probability, at this token position.
The type of modality for the model completion.
Usage statistics for the completion request.
Breakdown of tokens used in a completion.
Breakdown of tokens used in the prompt
Thrown on 4xx client errors, such as 401 - Incorrect API key provided, 401 - You must
be a member of an organization to use the API, 429 - Rate limit reached for requests,
429 - You exceeded your current quota , please check your plan and billing details.
Common value constants for OpenAI api.
Enumeration of OpenAI API response headers.Turn audio into text or text into audio.
Builder to construct
OpenAiAudioApi instance.Request to generates audio from the input text.
The format to audio in.
Builder for the SpeechRequest.
The voice to use for synthesis.
The Transcription
Object represents a verbose json transcription response returned by model,
based on the provided input.
Segment of the transcribed text and its corresponding details.
Extracted word and it corresponding timestamps.
Request to transcribe an audio file to text.
The format of the transcript and translation outputs, in one of these options:
json, text, srt, verbose_json, or vtt.
Request to translate an audio file to English.
TTS is an AI model that converts text to natural sounding spoken text.
Whisper is a
general-purpose speech recognition model.
OpenAI audio speech client implementation for backed by
OpenAiAudioApi.Options for OpenAI text to audio - speech synthesis.
Audio speech metadata implementation for OpenAI.
OpenAI audio transcription client implementation for backed by
OpenAiAudioApi.OpenAI Audio Transcription Options.
Audio transcription metadata implementation for OpenAI.
Options for the OpenAI Chat API.
Open AI Embedding Model implementation.
OpenAI Embedding Options.
OpenAI Image API.
Builder to construct
OpenAiImageApi instance.OpenAI Image API model.
OpenAiImageModel is a class that implements the ImageModel interface.
OpenAI Image API options.
OpenAI Moderation API.
Builder to construct
OpenAiModerationApi instance.OpenAiModerationModel is a class that implements the ModerationModel interface.
OpenAI Moderation API options.
RateLimit implementation for OpenAI.Utility used to extract known HTTP response headers for the OpenAI API.
The OpenAiRuntimeHints class is responsible for registering runtime hints for OpenAI
API classes.
Helper class to support Streaming function calling.
An object specifying the format that the model must output.
JSON schema object that describes the format of the JSON object.
The Speech class represents the result of speech synthesis from an AI model.
The
SpeechMessage class represents a single text message to be converted to
speech by the OpenAI TTS API.The
SpeechModel interface provides a way to interact with the OpenAI
Text-to-Speech (TTS) API.The
SpeechPrompt class represents a request to the OpenAI Text-to-Speech (TTS)
API.Creates a new instance of SpeechResponse with the given speech result.
The
StreamingSpeechModel interface provides a way to interact with the OpenAI
Text-to-Speech (TTS) API using a streaming approach, allowing you to receive the
generated audio in a real-time fashion.