Skip to main content

objectiveai_sdk/error/
request.rs

1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4/// Request to trigger an error response for testing purposes.
5#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
6#[schemars(rename = "error.ErrorCreateParams")]
7pub struct ErrorCreateParams {
8    /// Random seed for deterministic error generation.
9    #[serde(skip_serializing_if = "Option::is_none")]
10    #[schemars(extend("omitempty" = true))]
11    pub seed: Option<i64>,
12    /// Whether to stream the response.
13    #[serde(skip_serializing_if = "Option::is_none")]
14    #[schemars(extend("omitempty" = true))]
15    pub stream: Option<bool>,
16}