use super::stream::{
ResponseAudioDeltaEvent, ResponseAudioDoneEvent, ResponseAudioTranscriptDeltaEvent,
ResponseAudioTranscriptDoneEvent, ResponseCodeInterpreterCallCodeDeltaEvent,
ResponseCodeInterpreterCallCodeDoneEvent, ResponseCodeInterpreterCallCompletedEvent,
ResponseCodeInterpreterCallInProgressEvent, ResponseCodeInterpreterCallInterpretingEvent,
ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseContentPartDoneEvent,
ResponseCreatedEvent, ResponseCustomToolCallInputDeltaEvent,
ResponseCustomToolCallInputDoneEvent, ResponseFailedEvent,
ResponseFileSearchCallCompletedEvent, ResponseFileSearchCallInProgressEvent,
ResponseFileSearchCallSearchingEvent, ResponseFunctionCallArgumentsDeltaEvent,
ResponseFunctionCallArgumentsDoneEvent, ResponseImageGenCallCompletedEvent,
ResponseImageGenCallGeneratingEvent, ResponseImageGenCallInProgressEvent,
ResponseImageGenCallPartialImageEvent, ResponseInProgressEvent, ResponseIncompleteEvent,
ResponseMCPCallArgumentsDeltaEvent, ResponseMCPCallArgumentsDoneEvent,
ResponseMCPCallCompletedEvent, ResponseMCPCallFailedEvent, ResponseMCPCallInProgressEvent,
ResponseMCPListToolsCompletedEvent, ResponseMCPListToolsFailedEvent,
ResponseMCPListToolsInProgressEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent,
ResponseOutputTextAnnotationAddedEvent, ResponseQueuedEvent,
ResponseReasoningSummaryPartAddedEvent, ResponseReasoningSummaryPartDoneEvent,
ResponseReasoningSummaryTextDeltaEvent, ResponseReasoningSummaryTextDoneEvent,
ResponseReasoningTextDeltaEvent, ResponseReasoningTextDoneEvent, ResponseRefusalDeltaEvent,
ResponseRefusalDoneEvent, ResponseShellCallCommandAddedStreamingEvent,
ResponseShellCallCommandDeltaStreamingEvent, ResponseShellCallCommandDoneStreamingEvent,
ResponseShellCallOutputContentDeltaStreamingEvent,
ResponseShellCallOutputContentDoneStreamingEvent, ResponseTextDeltaEvent,
ResponseTextDoneEvent, ResponseWebSearchCallCompletedEvent,
ResponseWebSearchCallInProgressEvent, ResponseWebSearchCallSearchingEvent,
};
use super::{CreateResponse, FunctionCallOutputItemParam, MisalignmentErrorDetailsResource};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(tag = "type")]
pub enum ResponsesClientEvent {
#[serde(rename = "response.create")]
Create(Box<ResponsesClientEventResponseCreate>),
#[serde(rename = "response.steer")]
Steer(ResponseSteerEvent),
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponsesClientEventResponseCreate {
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
#[serde(flatten)]
pub response: CreateResponse,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(tag = "type")]
pub enum ResponsesServerEvent {
#[serde(rename = "response.audio.delta")]
ResponseAudioDelta(ResponseAudioWsDelta),
#[serde(rename = "response.audio.done")]
ResponseAudioDone(ResponseAudioWsDone),
#[serde(rename = "response.audio.transcript.delta")]
ResponseAudioTranscriptDelta(ResponseAudioTranscriptWsDelta),
#[serde(rename = "response.audio.transcript.done")]
ResponseAudioTranscriptDone(ResponseAudioTranscriptWsDone),
#[serde(rename = "response.code_interpreter_call_code.delta")]
ResponseCodeInterpreterCallCodeDelta(ResponseCodeInterpreterCallCodeWsDelta),
#[serde(rename = "response.code_interpreter_call_code.done")]
ResponseCodeInterpreterCallCodeDone(ResponseCodeInterpreterCallCodeWsDone),
#[serde(rename = "response.code_interpreter_call.completed")]
ResponseCodeInterpreterCallCompleted(ResponseCodeInterpreterCallWsCompleted),
#[serde(rename = "response.code_interpreter_call.in_progress")]
ResponseCodeInterpreterCallInProgress(ResponseCodeInterpreterCallInWsProgress),
#[serde(rename = "response.code_interpreter_call.interpreting")]
ResponseCodeInterpreterCallInterpreting(ResponseCodeInterpreterCallWsInterpreting),
#[serde(rename = "response.completed")]
ResponseCompleted(ResponseWsCompleted),
#[serde(rename = "response.content_part.added")]
ResponseContentPartAdded(ResponseContentPartWsAdded),
#[serde(rename = "response.content_part.done")]
ResponseContentPartDone(ResponseContentPartWsDone),
#[serde(rename = "response.created")]
ResponseCreated(ResponseWsCreated),
#[serde(rename = "response.file_search_call.completed")]
ResponseFileSearchCallCompleted(ResponseFileSearchCallWsCompleted),
#[serde(rename = "response.file_search_call.in_progress")]
ResponseFileSearchCallInProgress(ResponseFileSearchCallInWsProgress),
#[serde(rename = "response.file_search_call.searching")]
ResponseFileSearchCallSearching(ResponseFileSearchCallWsSearching),
#[serde(rename = "response.function_call_arguments.delta")]
ResponseFunctionCallArgumentsDelta(ResponseFunctionCallArgumentsWsDelta),
#[serde(rename = "response.function_call_arguments.done")]
ResponseFunctionCallArgumentsDone(ResponseFunctionCallArgumentsWsDone),
#[serde(rename = "response.shell_call_command.added")]
ResponseShellCallCommandAdded(ResponseShellCallCommandWsAdded),
#[serde(rename = "response.shell_call_command.delta")]
ResponseShellCallCommandDelta(ResponseShellCallCommandWsDelta),
#[serde(rename = "response.shell_call_command.done")]
ResponseShellCallCommandDone(ResponseShellCallCommandWsDone),
#[serde(rename = "response.shell_call_output_content.delta")]
ResponseShellCallOutputContentDelta(ResponseShellCallOutputContentWsDelta),
#[serde(rename = "response.shell_call_output_content.done")]
ResponseShellCallOutputContentDone(ResponseShellCallOutputContentWsDone),
#[serde(rename = "response.in_progress")]
ResponseInProgress(ResponseInWsProgress),
#[serde(rename = "response.failed")]
ResponseFailed(ResponseWsFailed),
#[serde(rename = "response.incomplete")]
ResponseIncomplete(ResponseWsIncomplete),
#[serde(rename = "response.output_item.added")]
ResponseOutputItemAdded(ResponseOutputItemWsAdded),
#[serde(rename = "response.output_item.done")]
ResponseOutputItemDone(ResponseOutputItemWsDone),
#[serde(rename = "response.reasoning_summary_part.added")]
ResponseReasoningSummaryPartAdded(ResponseReasoningSummaryPartWsAdded),
#[serde(rename = "response.reasoning_summary_part.done")]
ResponseReasoningSummaryPartDone(ResponseReasoningSummaryPartWsDone),
#[serde(rename = "response.reasoning_summary_text.delta")]
ResponseReasoningSummaryTextDelta(ResponseReasoningSummaryTextWsDelta),
#[serde(rename = "response.reasoning_summary_text.done")]
ResponseReasoningSummaryTextDone(ResponseReasoningSummaryTextWsDone),
#[serde(rename = "response.reasoning_text.delta")]
ResponseReasoningTextDelta(ResponseReasoningTextWsDelta),
#[serde(rename = "response.reasoning_text.done")]
ResponseReasoningTextDone(ResponseReasoningTextWsDone),
#[serde(rename = "response.refusal.delta")]
ResponseRefusalDelta(ResponseRefusalWsDelta),
#[serde(rename = "response.refusal.done")]
ResponseRefusalDone(ResponseRefusalWsDone),
#[serde(rename = "response.output_text.delta")]
ResponseOutputTextDelta(ResponseTextWsDelta),
#[serde(rename = "response.output_text.done")]
ResponseOutputTextDone(ResponseTextWsDone),
#[serde(rename = "response.web_search_call.completed")]
ResponseWebSearchCallCompleted(ResponseWebSearchCallWsCompleted),
#[serde(rename = "response.web_search_call.in_progress")]
ResponseWebSearchCallInProgress(ResponseWebSearchCallInWsProgress),
#[serde(rename = "response.web_search_call.searching")]
ResponseWebSearchCallSearching(ResponseWebSearchCallWsSearching),
#[serde(rename = "response.image_generation_call.completed")]
ResponseImageGenerationCallCompleted(ResponseImageGenCallWsCompleted),
#[serde(rename = "response.image_generation_call.generating")]
ResponseImageGenerationCallGenerating(ResponseImageGenCallWsGenerating),
#[serde(rename = "response.image_generation_call.in_progress")]
ResponseImageGenerationCallInProgress(ResponseImageGenCallInWsProgress),
#[serde(rename = "response.image_generation_call.partial_image")]
ResponseImageGenerationCallPartialImage(ResponseImageGenCallPartialWsImage),
#[serde(rename = "response.mcp_call_arguments.delta")]
ResponseMCPCallArgumentsDelta(ResponseMcpCallArgumentsWsDelta),
#[serde(rename = "response.mcp_call_arguments.done")]
ResponseMCPCallArgumentsDone(ResponseMcpCallArgumentsWsDone),
#[serde(rename = "response.mcp_call.completed")]
ResponseMCPCallCompleted(ResponseMcpCallWsCompleted),
#[serde(rename = "response.mcp_call.failed")]
ResponseMCPCallFailed(ResponseMcpCallWsFailed),
#[serde(rename = "response.mcp_call.in_progress")]
ResponseMCPCallInProgress(ResponseMcpCallInWsProgress),
#[serde(rename = "response.mcp_list_tools.completed")]
ResponseMCPListToolsCompleted(ResponseMcpListToolsWsCompleted),
#[serde(rename = "response.mcp_list_tools.failed")]
ResponseMCPListToolsFailed(ResponseMcpListToolsWsFailed),
#[serde(rename = "response.mcp_list_tools.in_progress")]
ResponseMCPListToolsInProgress(ResponseMcpListToolsInWsProgress),
#[serde(rename = "response.output_text.annotation.added")]
ResponseOutputTextAnnotationAdded(ResponseOutputTextAnnotationWsAdded),
#[serde(rename = "response.queued")]
ResponseQueued(ResponseWsQueued),
#[serde(rename = "response.custom_tool_call_input.delta")]
ResponseCustomToolCallInputDelta(ResponseCustomToolCallInputWsDelta),
#[serde(rename = "response.custom_tool_call_input.done")]
ResponseCustomToolCallInputDone(ResponseCustomToolCallInputWsDone),
#[serde(rename = "error")]
Error(ResponseWsError),
#[serde(rename = "response.steer.accepted")]
SteerAccepted(ResponseSteerAcceptedEvent),
#[serde(rename = "response.steer.pending")]
SteerPending(ResponseSteerPendingEvent),
#[serde(rename = "response.steer.failed")]
SteerFailed(ResponseSteerFailedEvent),
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseAudioWsDelta {
#[serde(flatten)]
pub event: ResponseAudioDeltaEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseAudioWsDone {
#[serde(flatten)]
pub event: ResponseAudioDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseAudioTranscriptWsDelta {
#[serde(flatten)]
pub event: ResponseAudioTranscriptDeltaEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseAudioTranscriptWsDone {
#[serde(flatten)]
pub event: ResponseAudioTranscriptDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseCodeInterpreterCallCodeWsDelta {
#[serde(flatten)]
pub event: ResponseCodeInterpreterCallCodeDeltaEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseCodeInterpreterCallCodeWsDone {
#[serde(flatten)]
pub event: ResponseCodeInterpreterCallCodeDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseCodeInterpreterCallWsCompleted {
#[serde(flatten)]
pub event: ResponseCodeInterpreterCallCompletedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseCodeInterpreterCallInWsProgress {
#[serde(flatten)]
pub event: ResponseCodeInterpreterCallInProgressEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseCodeInterpreterCallWsInterpreting {
#[serde(flatten)]
pub event: ResponseCodeInterpreterCallInterpretingEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseWsCompleted {
#[serde(flatten)]
pub event: ResponseCompletedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseContentPartWsAdded {
#[serde(flatten)]
pub event: ResponseContentPartAddedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseContentPartWsDone {
#[serde(flatten)]
pub event: ResponseContentPartDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseWsCreated {
#[serde(flatten)]
pub event: ResponseCreatedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseFileSearchCallWsCompleted {
#[serde(flatten)]
pub event: ResponseFileSearchCallCompletedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseFileSearchCallInWsProgress {
#[serde(flatten)]
pub event: ResponseFileSearchCallInProgressEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseFileSearchCallWsSearching {
#[serde(flatten)]
pub event: ResponseFileSearchCallSearchingEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseFunctionCallArgumentsWsDelta {
#[serde(flatten)]
pub event: ResponseFunctionCallArgumentsDeltaEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseFunctionCallArgumentsWsDone {
#[serde(flatten)]
pub event: ResponseFunctionCallArgumentsDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseShellCallCommandWsAdded {
#[serde(flatten)]
pub event: ResponseShellCallCommandAddedStreamingEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseShellCallCommandWsDelta {
#[serde(flatten)]
pub event: ResponseShellCallCommandDeltaStreamingEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseShellCallCommandWsDone {
#[serde(flatten)]
pub event: ResponseShellCallCommandDoneStreamingEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseShellCallOutputContentWsDelta {
#[serde(flatten)]
pub event: ResponseShellCallOutputContentDeltaStreamingEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseShellCallOutputContentWsDone {
#[serde(flatten)]
pub event: ResponseShellCallOutputContentDoneStreamingEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseInWsProgress {
#[serde(flatten)]
pub event: ResponseInProgressEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseWsFailed {
#[serde(flatten)]
pub event: ResponseFailedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseWsIncomplete {
#[serde(flatten)]
pub event: ResponseIncompleteEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseOutputItemWsAdded {
#[serde(flatten)]
pub event: ResponseOutputItemAddedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseOutputItemWsDone {
#[serde(flatten)]
pub event: ResponseOutputItemDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseReasoningSummaryPartWsAdded {
#[serde(flatten)]
pub event: ResponseReasoningSummaryPartAddedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseReasoningSummaryPartWsDone {
#[serde(flatten)]
pub event: ResponseReasoningSummaryPartDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseReasoningSummaryTextWsDelta {
#[serde(flatten)]
pub event: ResponseReasoningSummaryTextDeltaEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseReasoningSummaryTextWsDone {
#[serde(flatten)]
pub event: ResponseReasoningSummaryTextDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseReasoningTextWsDelta {
#[serde(flatten)]
pub event: ResponseReasoningTextDeltaEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseReasoningTextWsDone {
#[serde(flatten)]
pub event: ResponseReasoningTextDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseRefusalWsDelta {
#[serde(flatten)]
pub event: ResponseRefusalDeltaEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseRefusalWsDone {
#[serde(flatten)]
pub event: ResponseRefusalDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseTextWsDelta {
#[serde(flatten)]
pub event: ResponseTextDeltaEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseTextWsDone {
#[serde(flatten)]
pub event: ResponseTextDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseWebSearchCallWsCompleted {
#[serde(flatten)]
pub event: ResponseWebSearchCallCompletedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseWebSearchCallInWsProgress {
#[serde(flatten)]
pub event: ResponseWebSearchCallInProgressEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseWebSearchCallWsSearching {
#[serde(flatten)]
pub event: ResponseWebSearchCallSearchingEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseImageGenCallWsCompleted {
#[serde(flatten)]
pub event: ResponseImageGenCallCompletedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseImageGenCallWsGenerating {
#[serde(flatten)]
pub event: ResponseImageGenCallGeneratingEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseImageGenCallInWsProgress {
#[serde(flatten)]
pub event: ResponseImageGenCallInProgressEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseImageGenCallPartialWsImage {
#[serde(flatten)]
pub event: ResponseImageGenCallPartialImageEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseMcpCallArgumentsWsDelta {
#[serde(flatten)]
pub event: ResponseMCPCallArgumentsDeltaEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseMcpCallArgumentsWsDone {
#[serde(flatten)]
pub event: ResponseMCPCallArgumentsDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseMcpCallWsCompleted {
#[serde(flatten)]
pub event: ResponseMCPCallCompletedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseMcpCallWsFailed {
#[serde(flatten)]
pub event: ResponseMCPCallFailedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseMcpCallInWsProgress {
#[serde(flatten)]
pub event: ResponseMCPCallInProgressEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseMcpListToolsWsCompleted {
#[serde(flatten)]
pub event: ResponseMCPListToolsCompletedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseMcpListToolsWsFailed {
#[serde(flatten)]
pub event: ResponseMCPListToolsFailedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseMcpListToolsInWsProgress {
#[serde(flatten)]
pub event: ResponseMCPListToolsInProgressEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseOutputTextAnnotationWsAdded {
#[serde(flatten)]
pub event: ResponseOutputTextAnnotationAddedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseWsQueued {
#[serde(flatten)]
pub event: ResponseQueuedEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseCustomToolCallInputWsDelta {
#[serde(flatten)]
pub event: ResponseCustomToolCallInputDeltaEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseCustomToolCallInputWsDone {
#[serde(flatten)]
pub event: ResponseCustomToolCallInputDoneEvent,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ErrorPayload {
pub r#type: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
pub message: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub param: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub headers: Option<std::collections::HashMap<String, String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub misalignment: Option<MisalignmentErrorDetailsResource>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerAcceptedEvent {
pub sequence_number: u64,
pub steer: ResponseSteerAcceptedEventSteer,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerAcceptedEventSteer {
pub id: String,
pub previous_response_id: String,
}
pub type ResponseSteerErrorCode = String;
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerEvent {
pub previous_response_id: String,
pub input: ResponseSteerInput,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerFailedEvent {
pub sequence_number: i64,
pub steer: ResponseSteerFailedEventSteer,
pub error: ResponseSteerFailedEventError,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerFailedEventError {
pub r#type: ResponseSteerFailedEventErrorType,
pub code: ResponseSteerErrorCode,
pub message: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum ResponseSteerFailedEventErrorType {
#[serde(rename = "invalid_request_error")]
InvalidRequestError,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerFailedEventSteer {
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
pub previous_response_id: String,
pub input: ResponseSteerInput,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(untagged)]
pub enum ResponseSteerInput {
Text(String),
List(Vec<ResponseSteerInputItem>),
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum ResponseSteerInputItem {
Message(UserMessageItemParam),
FunctionCallOutput(FunctionCallOutputItemParam),
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerPendingEvent {
pub sequence_number: u64,
pub steer: ResponseSteerPendingEventSteer,
pub reason: ResponseSteerPendingReason,
pub required_input: Vec<ResponseSteerRequiredInput>,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerPendingEventSteer {
pub id: String,
pub previous_response_id: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum ResponseSteerPendingReason {
WaitingForRequiredInput,
#[serde(untagged)]
Other(String),
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(tag = "type")]
pub enum ResponseSteerRequiredInput {
#[serde(rename = "function_call_output")]
FunctionCallOutput(ResponseSteerRequiredInputFunctionCallOutput),
#[serde(rename = "custom_tool_call_output")]
CustomToolCallOutput(ResponseSteerRequiredInputCustomToolCallOutput),
#[serde(rename = "computer_call_output")]
ComputerCallOutput(ResponseSteerRequiredInputComputerCallOutput),
#[serde(rename = "shell_call_output")]
ShellCallOutput(ResponseSteerRequiredInputShellCallOutput),
#[serde(rename = "apply_patch_call_output")]
ApplyPatchCallOutput(ResponseSteerRequiredInputApplyPatchCallOutput),
#[serde(rename = "tool_search_output")]
ToolSearchOutput(ResponseSteerRequiredInputToolSearchOutput),
#[serde(rename = "mcp_approval_response")]
McpApprovalResponse(ResponseSteerRequiredInputMcpApprovalResponse),
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerRequiredInputFunctionCallOutput {
pub call_id: String,
pub name: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerRequiredInputCustomToolCallOutput {
pub call_id: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerRequiredInputComputerCallOutput {
pub call_id: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerRequiredInputShellCallOutput {
pub call_id: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerRequiredInputApplyPatchCallOutput {
pub call_id: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerRequiredInputToolSearchOutput {
pub call_id: String,
pub execution: ResponseSteerRequiredInputToolSearchOutputExecution,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum ResponseSteerRequiredInputToolSearchOutputExecution {
#[serde(rename = "client")]
Client,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseSteerRequiredInputMcpApprovalResponse {
pub approval_request_id: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponseWsError {
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sequence_number: Option<u64>,
pub error: ErrorPayload,
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct ResponsesWebSocketStreamEvent {
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct UserMessageItemParam {
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
pub role: UserMessageItemParamRole,
pub content: crate::types::responses::EasyInputContent,
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum UserMessageItemParamRole {
User,
}