Module responses

Source

Re-exports§

pub use crate::types::CompletionTokensDetails;
pub use crate::types::ImageDetail;
pub use crate::types::PromptTokensDetails;
pub use crate::types::ReasoningEffort;
pub use crate::types::ResponseFormatJsonSchema;

Structs§

Click
A click action.
CodeInterpreter
Code interpreter tool definition.
CodeInterpreterArgs
Builder for CodeInterpreter.
CodeInterpreterCallOutput
Output of a code interpreter request.
CodeInterpreterFile
CodeInterpreterFileOutput
The output containing file references.
CodeInterpreterTextOutput
The output containing execution logs.
ComparisonFilter
Single comparison filter.
CompoundFilter
Combine multiple filters.
ComputerCallOutput
Output from a computer tool call.
ComputerUsePreview
ComputerUsePreviewArgs
Builder for ComputerUsePreview.
CreateResponse
Builder for a Responses API request.
CreateResponseArgs
Builder for CreateResponse.
DoubleClick
A double click action.
Drag
A drag action.
ErrorObject
Error returned by the API when a request fails.
FileCitation
FilePath
FileSearch
FileSearchArgs
Builder for FileSearch.
FileSearchCallOutput
File search tool call output.
FileSearchResult
A single result from a file search.
Function
FunctionArgs
Builder for Function.
FunctionCall
Metadata for a function call request.
ImageGeneration
Image generation tool definition.
ImageGenerationArgs
Builder for ImageGeneration.
ImageGenerationCallOutput
Output of an image generation request.
IncompleteDetails
Details about an incomplete response.
InputFile
InputFileArgs
Builder for InputFile.
InputImage
InputImageArgs
Builder for InputImage.
InputImageMask
Mask image input for image generation.
InputMessage
A message to prime the model.
InputMessageArgs
Builder for InputMessage.
InputText
KeyPress
A keypress action.
LocalShellAction
Define the shape of a local shell action (exec).
LocalShellCallOutput
Output of a local shell command request.
Location
Approximate user location for web search.
LocationArgs
Builder for Location.
Mcp
MCP (Model Context Protocol) tool configuration.
McpAllowedToolsFilter
Filter object for MCP allowed tools.
McpApprovalFilter
Filter object for MCP tool approval.
McpApprovalRequestOutput
Output representing a human approval request for an MCP tool.
McpArgs
Builder for Mcp.
McpCallOutput
Output of an MCP server tool invocation.
McpListToolsOutput
Output listing tools available on an MCP server.
McpToolInfo
Information about a single tool on an MCP server.
MoveAction
A mouse move action.
OutputMessage
A message generated by the model.
OutputText
A simple text output from the model.
Point
A point in 2D space.
RankingOptions
Options for search result ranking.
ReasoningConfig
o-series reasoning settings.
ReasoningConfigArgs
Builder for ReasoningConfig.
ReasoningItem
A reasoning item representing the model’s chain of thought, including summary paragraphs.
Refusal
A refusal explanation from the model.
Response
The complete response returned by the Responses API.
SafetyCheck
Scroll
A scroll action.
SummaryText
A single summary text fragment from reasoning.
TextConfig
Configuration for text response format.
TypeAction
A typing (text entry) action.
UrlCitation
Usage
Usage statistics for a response.
WebSearchCallOutput
Web search tool call output.
WebSearchPreview
WebSearchPreviewArgs
Builder for WebSearchPreview.

Enums§

AllowedTools
Allowed tools configuration for MCP.
Annotation
ButtonPress
CodeInterpreterContainer
Container configuration for a code interpreter.
CodeInterpreterContainerKind
Auto configuration for code interpreter container.
CodeInterpreterResult
Individual result from a code interpreter: either logs or files.
ComparisonType
CompoundType
ComputerCallAction
Represents all user‐triggered actions.
ComputerUsePreviewArgsError
Error type for ComputerUsePreviewArgs
Content
ContentType
Parts of a message: text, image, file, or audio.
FileSearchCallOutputStatus
Filter
Filters for file search.
FunctionArgsError
Error type for FunctionArgs
HostedToolType
Hosted tool type identifiers.
ImageGenerationBackground
ImageGenerationOutputFormat
ImageGenerationQuality
ImageGenerationSize
Input
Input payload: raw text or structured context items.
InputContent
InputItem
A context item: currently only messages.
InputMessageType
OutputContent
Nested content within an output message.
OutputStatus
Status of input/output items.
ReasoningSummary
RequireApproval
Approval policy or filter for MCP tools.
RequireApprovalPolicy
Role
Role of messages in the API.
ServiceTier
Service tier request options.
Status
TextResponseFormat
ToolChoice
Control how the model picks or is forced to pick a tool.
ToolChoiceMode
Simple tool-choice modes.
ToolDefinition
Definitions for model-callable tools.
Truncation
Truncation strategies.
WebSearchContextSize
WebSearchPreviewArgsError
Error type for WebSearchPreviewArgs