Skip to main content

async_openai/types/
safety.rs

1#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq)]
2pub enum SafetyAlertErrorType {
3    #[serde(rename = "potentially_unintended_data_transfer")]
4    PotentiallyUnintendedDataTransfer,
5    #[serde(rename = "potentially_unintended_data_access")]
6    PotentiallyUnintendedDataAccess,
7    #[serde(rename = "potentially_unintended_destructive_activity")]
8    PotentiallyUnintendedDestructiveActivity,
9    #[serde(rename = "other")]
10    Other,
11}
12
13#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq)]
14pub struct SafetyAlertResource {
15    pub id: String,
16    pub object: String,
17    pub created_at: u64,
18    pub request_id: String,
19    pub response_id: String,
20    pub model: String,
21    /// Whether block registration succeeded for this request. This does not confirm that response execution
22    /// stopped.
23    pub request_paused: bool,
24    pub error_type: SafetyAlertErrorType,
25    #[serde(skip_serializing_if = "Option::is_none")]
26    pub reason: Option<String>,
27}