use crate::{ApiKind, prelude::*};

/// The AI options
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct AiOptions {
    #[serde(rename = "type")]
    pub kind: ApiKind,
    pub model: String,

    #[serde(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub env_var: Option<String>,

    #[serde(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub server: Option<String>,

    #[serde(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub proxy: Option<String>,

    #[serde(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub max_tokens: Option<i32>,

    #[serde(default)]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub temperature: Option<f32>,
}
