Module responses

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§

AnyItemReference
Billing
ClickParam
A click action.
CodeInterpreterContainerAuto
Auto configuration for code interpreter container.
CodeInterpreterFile
CodeInterpreterOutputImage
CodeInterpreterOutputLogs
CodeInterpreterTool
CodeInterpreterToolArgs
Builder for CodeInterpreterTool.
CodeInterpreterToolCall
Output of a code interpreter request.
ComparisonFilter
Single comparison filter.
CompoundFilter
Combine multiple filters using and or or.
ComputerCallOutputItemParam
ComputerCallSafetyCheckParam
ComputerScreenContent
ComputerScreenshotImage
A computer screenshot image used with the computer use tool.
ComputerToolCall
Output from a computer tool call.
ComputerUsePreviewTool
ComputerUsePreviewToolArgs
Builder for ComputerUsePreviewTool.
ContainerFileCitationBody
Conversation
ConversationItemList
A list of Conversation items.
ConversationResource
Represents a conversation object.
CreateConversationItemsRequest
Request to create conversation items.
CreateConversationItemsRequestArgs
Builder for CreateConversationItemsRequest.
CreateConversationRequest
Request to create a conversation. openapi spec type: CreateConversationBody
CreateConversationRequestArgs
Builder for CreateConversationRequest.
CreateResponse
Builder for a Responses API request.
CreateResponseArgs
Builder for CreateResponse.
CustomGrammarFormatParam
CustomGrammarFormatParamBuilder
Builder for CustomGrammarFormatParam.
CustomToolCall
CustomToolCallOutput
CustomToolParam
CustomToolParamBuilder
Builder for CustomToolParam.
DeleteConversationResponse
Represents a deleted conversation.
DeleteResponse
DoubleClickAction
A double click action.
Drag
A drag action.
DragPoint
A point in 2D space.
EasyInputMessage
A simplified message input to the model (EasyInputMessage in the OpenAPI spec).
EasyInputMessageArgs
Builder for EasyInputMessage.
ErrorObject
Error returned by the API when a request fails.
FileCitationBody
FilePath
FileSearchTool
FileSearchToolArgs
Builder for FileSearchTool.
FileSearchToolCall
File search tool call output.
FileSearchToolCallResult
A single result from a file search.
FunctionCallOutputItemParam
Output from a function call that you’re providing back to the model.
FunctionTool
FunctionToolArgs
Builder for FunctionTool.
FunctionToolCall
HybridSearch
ImageGenTool
Image generation tool definition.
ImageGenToolCall
ImageGenToolInputImageMask
ImageGenerationArgs
Builder for ImageGenTool.
IncompleteDetails
Details about an incomplete response.
InputFileArgs
Builder for InputFileContent.
InputFileContent
InputImageArgs
Builder for InputImageContent.
InputImageContent
InputMessage
A structured message input to the model (InputMessage in the OpenAPI spec).
InputMessageArgs
Builder for InputMessage.
InputTextContent
InputTokenDetails
ItemReference
A reference to an existing item by ID.
KeyPressAction
A keypress action.
ListConversationItemsQuery
Query parameters for listing conversation items.
ListConversationItemsQueryArgs
Builder for ListConversationItemsQuery.
LocalShellExecAction
Define the shape of a local shell action (exec).
LocalShellOutput
Output from a local shell command execution.
LocalShellToolCall
LocalShellToolCallOutput
Output from a local shell tool call that you’re providing back to the model.
LogProb
MCPApprovalRequest
MCPApprovalResponse
An MCP approval response that you’re providing back to the model.
MCPListTools
MCPToolCall
Output of an MCP server tool invocation.
Message
Move
A mouse move action.
OutputMessage
A message generated by the model.
OutputTextContent
A simple text output from the model.
OutputTokenDetails
Prompt
RankingOptions
Options for search result ranking.
Reasoning
o-series reasoning settings.
ReasoningArgs
Builder for Reasoning.
ReasoningItem
A reasoning item representing the model’s chain of thought, including summary paragraphs.
ReasoningTextContent
RefusalContent
A refusal explanation from the model.
Response
The complete response returned by the Responses API.
ResponseCodeInterpreterCallCodeDeltaEvent
ResponseCodeInterpreterCallCodeDoneEvent
ResponseCodeInterpreterCallCompletedEvent
ResponseCodeInterpreterCallInProgressEvent
ResponseCodeInterpreterCallInterpretingEvent
ResponseCompletedEvent
ResponseContentPartAddedEvent
ResponseContentPartDoneEvent
ResponseCreatedEvent
ResponseCustomToolCallInputDeltaEvent
ResponseCustomToolCallInputDoneEvent
ResponseErrorEvent
ResponseFailedEvent
ResponseFileSearchCallCompletedEvent
ResponseFileSearchCallInProgressEvent
ResponseFileSearchCallSearchingEvent
ResponseFunctionCallArgumentsDeltaEvent
ResponseFunctionCallArgumentsDoneEvent
ResponseImageGenCallCompletedEvent
ResponseImageGenCallGeneratingEvent
ResponseImageGenCallInProgressEvent
ResponseImageGenCallPartialImageEvent
ResponseInProgressEvent
ResponseIncompleteEvent
ResponseItemList
A list of Response items.
ResponseLogProb
ResponseMCPCallArgumentsDeltaEvent
ResponseMCPCallArgumentsDoneEvent
ResponseMCPCallCompletedEvent
ResponseMCPCallFailedEvent
ResponseMCPCallInProgressEvent
ResponseMCPListToolsCompletedEvent
ResponseMCPListToolsFailedEvent
ResponseMCPListToolsInProgressEvent
ResponseOutputItemAddedEvent
ResponseOutputItemDoneEvent
ResponseOutputTextAnnotationAddedEvent
ResponseQueuedEvent
ResponseReasoningSummaryPartAddedEvent
ResponseReasoningSummaryPartDoneEvent
ResponseReasoningSummaryTextDeltaEvent
ResponseReasoningSummaryTextDoneEvent
ResponseReasoningTextDeltaEvent
ResponseReasoningTextDoneEvent
ResponseRefusalDeltaEvent
ResponseRefusalDoneEvent
ResponseStreamOptions
ResponseTextDeltaEvent
ResponseTextDoneEvent
ResponseTextParam
Configuration for text response format.
ResponseTopLobProb
ResponseUsage
Usage statistics for a response.
ResponseWebSearchCallCompletedEvent
ResponseWebSearchCallInProgressEvent
ResponseWebSearchCallSearchingEvent
Scroll
A scroll action.
Summary
A single summary text fragment from reasoning.
SummaryTextContent
TextContent
TokenCountsBody
TokenCountsBodyArgs
Builder for TokenCountsBody.
TokenCountsResource
ToolChoiceAllowed
ToolChoiceCustom
ToolChoiceFunction
ToolChoiceMCP
TopLogProb
Type
A typing (text entry) action.
UpdateConversationRequest
Request to update a conversation.
UpdateConversationRequestArgs
Builder for UpdateConversationRequest.
UrlCitationBody
WebSearchActionFind
WebSearchActionOpenPage
WebSearchActionSearch
WebSearchActionSearchSource
WebSearchApproximateLocation
Approximate user location for web search.
WebSearchApproximateLocationArgs
Builder for WebSearchApproximateLocation.
WebSearchTool
WebSearchToolArgs
Builder for WebSearchTool.
WebSearchToolCall
Web search tool call output.
WebSearchToolFilters

Enums§

Annotation
AssistantRole
The role for an output message - always assistant. This type ensures type safety by only allowing the assistant role.
ClickButtonType
CodeInterpreterToolCallOutput
Individual result from a code interpreter: either logs or files.
CodeInterpreterToolCallStatus
CodeInterpreterToolContainer
Container configuration for a code interpreter.
ComparisonType
CompoundType
ComputerAction
Represents all user‐triggered actions.
ComputerEnvironment
ComputerScreenshotImageType
ComputerUsePreviewToolArgsError
Error type for ComputerUsePreviewToolArgs
ConversationItem
ConversationParam
CustomGrammarFormatParamBuilderError
Error type for CustomGrammarFormatParamBuilder
CustomToolCallOutputOutput
CustomToolParamBuilderError
Error type for CustomToolParamBuilder
CustomToolParamFormat
EasyInputContent
Content for EasyInputMessage - can be a simple string or structured list.
FileSearchToolCallStatus
Filter
Filters for file search.
FunctionCallOutput
FunctionToolArgsError
Error type for FunctionToolArgs
GrammarSyntax
ImageGenToolBackground
ImageGenToolCallStatus
ImageGenToolModeration
ImageGenToolOutputFormat
ImageGenToolQuality
ImageGenToolSize
IncludeEnum
IncludeParam
Additional fields to include in the response.
InputContent
Parts of a message: text, image, file, or audio.
InputFidelity
InputItem
Input item that can be used in the context for generating a response.
InputParam
InputRole
The role for an input message - can only be user, system, or developer. This type ensures type safety by excluding the assistant role (use OutputMessage for that).
Instructions
Item
Content item used to generate a response.
ItemReferenceType
ItemResource
ItemResourceItem
ListOrder
The order to return items in.
MCPToolCallStatus
MessageContent
MessageItem
A message item used within the Item enum.
MessageRole
MessageStatus
MessageType
OutputContent
OutputItem
Output item
OutputMessageContent
OutputStatus
Status of input/output items.
RankVersionType
ReasoningSummary
ResponsePromptVariables
ResponseStreamEvent
Event types for streaming responses from the Responses API
Role
Role of messages in the API.
ServiceTier
Status
SummaryPart
TextResponseFormatConfiguration
Tool
Definitions for model-callable tools.
ToolChoiceAllowedMode
ToolChoiceOptions
ToolChoiceParam
ToolChoiceTypes
The type of hosted tool the model should to use. Learn more about built-in tools.
Truncation
Truncation strategies.
Verbosity
o-series reasoning settings.
WebSearchApproximateLocationType
WebSearchToolArgsError
Error type for WebSearchToolArgs
WebSearchToolCallAction
WebSearchToolCallStatus
WebSearchToolSearchContextSize

Type Aliases§

ResponseStream
Stream of response events