---
source: src/test_helpers.rs
expression: "&generated_code"
---
//! Generated types from OpenAPI specification
//!
//! This file contains all the generated types for the API.
//! Do not edit manually - regenerate using the appropriate script.
#![allow(clippy::large_enum_variant)]
#![allow(clippy::format_in_format_args)]
#![allow(clippy::let_unit_value)]
#![allow(unreachable_patterns)]
use serde::{Deserialize, Serialize};
/// Serde normally maps both a missing `Option<T>` field and an
/// explicit JSON null to `None`. Wrapping the decoded value in
/// `Some` retains the field-presence bit for `Option<Option<T>>`.
mod tri_state_serde {
use serde::{Deserialize, Deserializer};
pub fn deserialize<'de, D, T>(de: D) -> Result<Option<T>, D::Error>
where
D: Deserializer<'de>,
T: Deserialize<'de>,
{
T::deserialize(de).map(Some)
}
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct CreateResponse {
///Text, image, or file inputs to the model
pub input: CreateResponseInput,
pub model: String,
#[serde(
skip_serializing_if = "Option::is_none",
default,
deserialize_with = "tri_state_serde::deserialize"
)]
pub temperature: Option<Option<f64>>,
}
///Text, image, or file inputs to the model
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum CreateResponseInput {
String(String),
InputArray(Vec<InputItem>),
}
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct ResponseProperties {
#[serde(
skip_serializing_if = "Option::is_none",
default,
deserialize_with = "tri_state_serde::deserialize"
)]
pub temperature: Option<Option<f64>>,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct InputItem {
pub content: String,
pub r#type: String,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct CreateModelResponseProperties {
pub model: String,
}