open_responses_dart library

Classes

AllowedToolsChoice
Allowed tools choice
Annotation
URL citation annotation
Client
HTTP client for the Open Responses API
ContentOutput
Content-based function output
ContentPartAddedEvent
Content part added event
ContentPartDoneEvent
Content part done event
CreateResponseBody
Create response request body
Error
Error in response
ErrorEvent
Error event
ErrorPayload
Error payload
FunctionCallArgumentsDeltaEvent
Function call arguments delta event
FunctionCallArgumentsDoneEvent
Function call arguments done event
FunctionCallItem
Function call item
FunctionCallOutputItem
Function call output item
FunctionOutput
Abstract class for function output
FunctionTool
Function tool
IncompleteDetails
Incomplete response details
Input
Input can be a simple string or a list of items
InputContent
Abstract base class for input content
InputFileContent
File input content
InputImageContent
Image input content
InputTextContent
Text input content
InputTokensDetails
Input tokens details
InputVideoContent
Video input content
Item
Abstract base class for items
ItemReference
Item reference
LogProb
Log probability
MessageItem
Message item
OutputContent
Abstract base class for output content
OutputItemAddedEvent
Output item added event
OutputItemDoneEvent
Output item done event
OutputTextContent
Text output content
OutputTextDeltaEvent
Output text delta event
OutputTextDoneEvent
Output text done event
OutputTokensDetails
Output tokens details
ReasoningConfig
Reasoning configuration
ReasoningItem
Reasoning item
ReasoningOutput
Reasoning output
ReasoningTextContent
Reasoning text content
RefusalContent
Refusal content
ResponseCompletedEvent
Response completed event
ResponseCreatedEvent
Response created event
ResponseFailedEvent
Response failed event
ResponseIncompleteEvent
Response incomplete event
ResponseInProgressEvent
Response in progress event
ResponseQueuedEvent
Response queued event
ResponseResource
Response resource from the API
SimpleToolChoice
Simple tool choice (auto, none, required)
SpecificFunctionChoice
Specific function tool choice
SpecificTool
Specific tool reference
StreamDoneEvent
Stream done marker
StreamingClient
Streaming client for SSE (Server-Sent Events)
StreamingEvent
Abstract base class for streaming events
StreamOptions
Stream options
StringOutput
String-based function output
SummaryTextContent
Summary text content
TextContent
Plain text content
TextField
Text field in response
TextFormat
Text format for output
TextFormatOutput
Text format output
TextParam
Text parameter configuration
Tool
Abstract base class for tools
ToolChoiceParam
Tool choice parameter
TopLogProb
Top log probability
Usage
Token usage

Enums

ErrorType
Error types
FunctionCallOutputStatus
Status of function call outputs
FunctionCallStatus
Status of function calls
ImageDetail
Image detail level
IncludeOption
Options to include in the response
MessageRole
Message roles in a conversation
MessageStatus
Status of items in the response
ReasoningEffort
Reasoning effort level
ReasoningSummary
Reasoning summary type
ServiceTier
Service tier for request processing
TextFormatType
Text format types
ToolChoice
Tool choice options
Truncation
Truncation strategy
Verbosity
Verbosity level for responses

Extensions

ItemFactory on Item
Extension for creating items easily
StreamingClientExtensions on StreamingClient
Extension to provide convenient stream handling

Functions

inputContentFromJson(Map<String, dynamic> json) InputContent
Factory for input content deserialization
itemFromJson(Map<String, dynamic> json) Item
Factory for item deserialization
outputContentFromJson(Map<String, dynamic> json) OutputContent
Factory for output content deserialization
streamingEventFromJson(Map<String, dynamic> json) StreamingEvent
Factory for streaming event deserialization
toolFromJson(Map<String, dynamic> json) Tool
Factory for tool deserialization

Exceptions / Errors

OpenResponsesException
Exception thrown by the client
StreamingException
Exception thrown by the streaming client