Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion async-openai/src/types/realtime/response_resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,26 @@ pub struct FailedError {
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "snake_case")]
pub enum IncompleteReason {
Interruption,
MaxOutputTokens,
ContentFilter,
}

#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "snake_case")]
pub enum CancelledReason {
TurnDetected,
ClientCancelled,
}

#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(tag = "type")]
pub enum ResponseStatusDetail {
#[serde(rename = "incomplete")]
Incomplete { reason: IncompleteReason },
#[serde(rename = "failed")]
Failed { error: Option<FailedError> },
#[serde(rename = "cancelled")]
Cancelled { reason: CancelledReason }
}

#[derive(Debug, Serialize, Deserialize, Clone)]
Expand Down