pub enum ResponseStreamEvent {
Show 49 variants
ResponseCreated(ResponseCreatedEvent),
ResponseInProgress(ResponseInProgressEvent),
ResponseCompleted(ResponseCompletedEvent),
ResponseFailed(ResponseFailedEvent),
ResponseIncomplete(ResponseIncompleteEvent),
ResponseOutputItemAdded(ResponseOutputItemAddedEvent),
ResponseOutputItemDone(ResponseOutputItemDoneEvent),
ResponseContentPartAdded(ResponseContentPartAddedEvent),
ResponseContentPartDone(ResponseContentPartDoneEvent),
ResponseOutputTextDelta(ResponseTextDeltaEvent),
ResponseOutputTextDone(ResponseTextDoneEvent),
ResponseRefusalDelta(ResponseRefusalDeltaEvent),
ResponseRefusalDone(ResponseRefusalDoneEvent),
ResponseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent),
ResponseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent),
ResponseFileSearchCallInProgress(ResponseFileSearchCallInProgressEvent),
ResponseFileSearchCallSearching(ResponseFileSearchCallSearchingEvent),
ResponseFileSearchCallCompleted(ResponseFileSearchCallCompletedEvent),
ResponseWebSearchCallInProgress(ResponseWebSearchCallInProgressEvent),
ResponseWebSearchCallSearching(ResponseWebSearchCallSearchingEvent),
ResponseWebSearchCallCompleted(ResponseWebSearchCallCompletedEvent),
ResponseReasoningSummaryPartAdded(ResponseReasoningSummaryPartAddedEvent),
ResponseReasoningSummaryPartDone(ResponseReasoningSummaryPartDoneEvent),
ResponseReasoningSummaryTextDelta(ResponseReasoningSummaryTextDeltaEvent),
ResponseReasoningSummaryTextDone(ResponseReasoningSummaryTextDoneEvent),
ResponseReasoningTextDelta(ResponseReasoningTextDeltaEvent),
ResponseReasoningTextDone(ResponseReasoningTextDoneEvent),
ResponseImageGenerationCallCompleted(ResponseImageGenCallCompletedEvent),
ResponseImageGenerationCallGenerating(ResponseImageGenCallGeneratingEvent),
ResponseImageGenerationCallInProgress(ResponseImageGenCallInProgressEvent),
ResponseImageGenerationCallPartialImage(ResponseImageGenCallPartialImageEvent),
ResponseMCPCallArgumentsDelta(ResponseMCPCallArgumentsDeltaEvent),
ResponseMCPCallArgumentsDone(ResponseMCPCallArgumentsDoneEvent),
ResponseMCPCallCompleted(ResponseMCPCallCompletedEvent),
ResponseMCPCallFailed(ResponseMCPCallFailedEvent),
ResponseMCPCallInProgress(ResponseMCPCallInProgressEvent),
ResponseMCPListToolsCompleted(ResponseMCPListToolsCompletedEvent),
ResponseMCPListToolsFailed(ResponseMCPListToolsFailedEvent),
ResponseMCPListToolsInProgress(ResponseMCPListToolsInProgressEvent),
ResponseCodeInterpreterCallInProgress(ResponseCodeInterpreterCallInProgressEvent),
ResponseCodeInterpreterCallInterpreting(ResponseCodeInterpreterCallInterpretingEvent),
ResponseCodeInterpreterCallCompleted(ResponseCodeInterpreterCallCompletedEvent),
ResponseCodeInterpreterCallCodeDelta(ResponseCodeInterpreterCallCodeDeltaEvent),
ResponseCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeDoneEvent),
ResponseOutputTextAnnotationAdded(ResponseOutputTextAnnotationAddedEvent),
ResponseQueued(ResponseQueuedEvent),
ResponseCustomToolCallInputDelta(ResponseCustomToolCallInputDeltaEvent),
ResponseCustomToolCallInputDone(ResponseCustomToolCallInputDoneEvent),
ResponseError(ResponseErrorEvent),
}Expand description
Event types for streaming responses from the Responses API
Variants§
ResponseCreated(ResponseCreatedEvent)
An event that is emitted when a response is created.
ResponseInProgress(ResponseInProgressEvent)
Emitted when the response is in progress.
ResponseCompleted(ResponseCompletedEvent)
Emitted when the model response is complete.
ResponseFailed(ResponseFailedEvent)
An event that is emitted when a response fails.
ResponseIncomplete(ResponseIncompleteEvent)
An event that is emitted when a response finishes as incomplete.
ResponseOutputItemAdded(ResponseOutputItemAddedEvent)
Emitted when a new output item is added.
ResponseOutputItemDone(ResponseOutputItemDoneEvent)
Emitted when an output item is marked done.
ResponseContentPartAdded(ResponseContentPartAddedEvent)
Emitted when a new content part is added.
ResponseContentPartDone(ResponseContentPartDoneEvent)
Emitted when a content part is done.
ResponseOutputTextDelta(ResponseTextDeltaEvent)
Emitted when there is an additional text delta.
ResponseOutputTextDone(ResponseTextDoneEvent)
Emitted when text content is finalized.
ResponseRefusalDelta(ResponseRefusalDeltaEvent)
Emitted when there is a partial refusal text.
ResponseRefusalDone(ResponseRefusalDoneEvent)
Emitted when refusal text is finalized.
ResponseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsDeltaEvent)
Emitted when there is a partial function-call arguments delta.
ResponseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsDoneEvent)
Emitted when function-call arguments are finalized.
ResponseFileSearchCallInProgress(ResponseFileSearchCallInProgressEvent)
Emitted when a file search call is initiated.
ResponseFileSearchCallSearching(ResponseFileSearchCallSearchingEvent)
Emitted when a file search is currently searching.
ResponseFileSearchCallCompleted(ResponseFileSearchCallCompletedEvent)
Emitted when a file search call is completed (results found).
ResponseWebSearchCallInProgress(ResponseWebSearchCallInProgressEvent)
Emitted when a web search call is initiated.
ResponseWebSearchCallSearching(ResponseWebSearchCallSearchingEvent)
Emitted when a web search call is executing.
ResponseWebSearchCallCompleted(ResponseWebSearchCallCompletedEvent)
Emitted when a web search call is completed.
ResponseReasoningSummaryPartAdded(ResponseReasoningSummaryPartAddedEvent)
Emitted when a new reasoning summary part is added.
ResponseReasoningSummaryPartDone(ResponseReasoningSummaryPartDoneEvent)
Emitted when a reasoning summary part is completed.
ResponseReasoningSummaryTextDelta(ResponseReasoningSummaryTextDeltaEvent)
Emitted when a delta is added to a reasoning summary text.
ResponseReasoningSummaryTextDone(ResponseReasoningSummaryTextDoneEvent)
Emitted when a reasoning summary text is completed.
ResponseReasoningTextDelta(ResponseReasoningTextDeltaEvent)
Emitted when a delta is added to a reasoning text.
ResponseReasoningTextDone(ResponseReasoningTextDoneEvent)
Emitted when a reasoning text is completed.
ResponseImageGenerationCallCompleted(ResponseImageGenCallCompletedEvent)
Emitted when an image generation tool call has completed and the final image is available.
ResponseImageGenerationCallGenerating(ResponseImageGenCallGeneratingEvent)
Emitted when an image generation tool call is actively generating an image (intermediate state).
ResponseImageGenerationCallInProgress(ResponseImageGenCallInProgressEvent)
Emitted when an image generation tool call is in progress.
ResponseImageGenerationCallPartialImage(ResponseImageGenCallPartialImageEvent)
Emitted when a partial image is available during image generation streaming.
ResponseMCPCallArgumentsDelta(ResponseMCPCallArgumentsDeltaEvent)
Emitted when there is a delta (partial update) to the arguments of an MCP tool call.
ResponseMCPCallArgumentsDone(ResponseMCPCallArgumentsDoneEvent)
Emitted when the arguments for an MCP tool call are finalized.
ResponseMCPCallCompleted(ResponseMCPCallCompletedEvent)
Emitted when an MCP tool call has completed successfully.
ResponseMCPCallFailed(ResponseMCPCallFailedEvent)
Emitted when an MCP tool call has failed.
ResponseMCPCallInProgress(ResponseMCPCallInProgressEvent)
Emitted when an MCP tool call is in progress.
ResponseMCPListToolsCompleted(ResponseMCPListToolsCompletedEvent)
Emitted when the list of available MCP tools has been successfully retrieved.
ResponseMCPListToolsFailed(ResponseMCPListToolsFailedEvent)
Emitted when the attempt to list available MCP tools has failed.
ResponseMCPListToolsInProgress(ResponseMCPListToolsInProgressEvent)
Emitted when the system is in the process of retrieving the list of available MCP tools.
ResponseCodeInterpreterCallInProgress(ResponseCodeInterpreterCallInProgressEvent)
Emitted when a code interpreter call is in progress.
ResponseCodeInterpreterCallInterpreting(ResponseCodeInterpreterCallInterpretingEvent)
Emitted when the code interpreter is actively interpreting the code snippet.
ResponseCodeInterpreterCallCompleted(ResponseCodeInterpreterCallCompletedEvent)
Emitted when the code interpreter call is completed.
ResponseCodeInterpreterCallCodeDelta(ResponseCodeInterpreterCallCodeDeltaEvent)
Emitted when a partial code snippet is streamed by the code interpreter.
ResponseCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeDoneEvent)
Emitted when the code snippet is finalized by the code interpreter.
ResponseOutputTextAnnotationAdded(ResponseOutputTextAnnotationAddedEvent)
Emitted when an annotation is added to output text content.
ResponseQueued(ResponseQueuedEvent)
Emitted when a response is queued and waiting to be processed.
ResponseCustomToolCallInputDelta(ResponseCustomToolCallInputDeltaEvent)
Event representing a delta (partial update) to the input of a custom tool call.
ResponseCustomToolCallInputDone(ResponseCustomToolCallInputDoneEvent)
Event indicating that input for a custom tool call is complete.
ResponseError(ResponseErrorEvent)
Emitted when an error occurs.
Trait Implementations§
Source§impl Clone for ResponseStreamEvent
impl Clone for ResponseStreamEvent
Source§fn clone(&self) -> ResponseStreamEvent
fn clone(&self) -> ResponseStreamEvent
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResponseStreamEvent
impl Debug for ResponseStreamEvent
Source§impl<'de> Deserialize<'de> for ResponseStreamEvent
impl<'de> Deserialize<'de> for ResponseStreamEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ResponseStreamEvent
impl PartialEq for ResponseStreamEvent
Source§impl Serialize for ResponseStreamEvent
impl Serialize for ResponseStreamEvent
impl StructuralPartialEq for ResponseStreamEvent
Auto Trait Implementations§
impl Freeze for ResponseStreamEvent
impl RefUnwindSafe for ResponseStreamEvent
impl Send for ResponseStreamEvent
impl Sync for ResponseStreamEvent
impl Unpin for ResponseStreamEvent
impl UnwindSafe for ResponseStreamEvent
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)