openai_api library

Classes

AudioFormats
BufferedBytes
CancellationToken
A token for controlling the cancellation of Cancellable operations.
ChatChoice
ChatChoiceDelta
ChatCompletionRequest
ChatCompletionRequest is the request body for the chat completion endpoint.
ChatCompletionResponse
ChatCompletionResponse is the response body for the chat completion endpoint.
ChatCompletionUsage
ChatFunction
ChatFunctionCall
ChatFunctionParameters
ChatMessage
ChatTool
Constants
Content
ContentText
FinishDetails
ImageContent
ImageData
ImageEditRequest
ImageFile
ImageQulity
ImageRequest
ImageResponse
ImageStyle
ImageUrl
ImageVariationRequest
MessageCreation
MessageToolCall
ModelListResponse
ModelResponse
Models
OpenaiClient
OpenaiConfig
OpenaiError
ResponseFormat
An object specifying the format that the model must output. Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON. Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
SpeechRequest
StepDetails
TextContent
Thread
Represents a thread that contains messages. https://platform.openai.com/docs/api-reference/threads
ThreadMessage
ThreadMessagesResponse
ThreadRun
Represents an execution run on a thread. https://platform.openai.com/docs/api-reference/runs/object
ThreadRunStep
Represents a step in execution of a run. https://platform.openai.com/docs/api-reference/runs/step-object
ThreadRunStepResponse
TimeoutCancellationToken
A CancellationToken that automatically cancels after a given duration.
ToolChoice
TranscriptionRequest
TranscriptionResponse
TranslationRequest
TraslationResponse
Voices

Enums

ChatMessageRole
ImageDetail
By controlling the detail parameter, which has three options, low, high, or auto, you have control over how the model processes the image and generates its textual understanding. By default, the model will use the auto setting which will look at the image input size and decide if it should use the low or high setting.
MessageContentType

Constants

dataPrefix → const String

Exceptions / Errors

CancelledException
OpenaiException