openai-client-base 0.12.0

Auto-generated Rust client for the OpenAI API
/*
 * OpenAI API
 *
 * The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
 *
 * The version of the OpenAPI document: 2.3.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// Tool : A tool that can be used to generate a response.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum Tool {
    FunctionTool(Box<models::FunctionTool>),
    FileSearchTool(Box<models::FileSearchTool>),
    ComputerTool(Box<models::ComputerTool>),
    ComputerUsePreviewTool(Box<models::ComputerUsePreviewTool>),
    WebSearchTool(Box<models::WebSearchTool>),
    McpTool(Box<models::McpTool>),
    CodeInterpreterTool(Box<models::CodeInterpreterTool>),
    ImageGenTool(Box<models::ImageGenTool>),
    LocalShellToolParam(Box<models::LocalShellToolParam>),
    FunctionShellToolParam(Box<models::FunctionShellToolParam>),
    CustomToolParam(Box<models::CustomToolParam>),
    NamespaceToolParam(Box<models::NamespaceToolParam>),
    SearchToolParam(Box<models::ToolSearchToolParam>),
    WebSearchPreviewTool(Box<models::WebSearchPreviewTool>),
    ApplyPatchToolParam(Box<models::ApplyPatchToolParam>),
}

/// Identifier for service connectors, like those available in ChatGPT. One of `server_url` or `connector_id` must be provided. Learn more about service connectors [here](/docs/guides/tools-remote-mcp#connectors).  Currently supported `connector_id` values are:  - Dropbox: `connector_dropbox` - Gmail: `connector_gmail` - Google Calendar: `connector_googlecalendar` - Google Drive: `connector_googledrive` - Microsoft Teams: `connector_microsoftteams` - Outlook Calendar: `connector_outlookcalendar` - Outlook Email: `connector_outlookemail` - SharePoint: `connector_sharepoint`
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ConnectorId {
    ConnectorDropbox,
    ConnectorGmail,
    ConnectorGooglecalendar,
    ConnectorGoogledrive,
    ConnectorMicrosoftteams,
    ConnectorOutlookcalendar,
    ConnectorOutlookemail,
    ConnectorSharepoint,
}

/// The quality of the generated image. One of `low`, `medium`, `high`, or `auto`. Default: `auto`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Quality {
    Low,
    Medium,
    High,
    Auto,
}

impl Default for Quality {
    fn default() -> Quality {
        Self::Low
    }
}
/// The size of the generated image. One of `1024x1024`, `1024x1536`, `1536x1024`, or `auto`. Default: `auto`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Size {
    Variant1024x1024,
    Variant1024x1536,
    Variant1536x1024,
    Auto,
}

impl Default for Size {
    fn default() -> Size {
        Self::Variant1024x1024
    }
}
/// The output format of the generated image. One of `png`, `webp`, or `jpeg`. Default: `png`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OutputFormat {
    Png,
    Webp,
    Jpeg,
}

impl Default for OutputFormat {
    fn default() -> OutputFormat {
        Self::Png
    }
}
/// Moderation level for the generated image. Default: `auto`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Moderation {
    Auto,
    Low,
}

impl Default for Moderation {
    fn default() -> Moderation {
        Self::Auto
    }
}
/// Background type for the generated image. One of `transparent`, `opaque`, or `auto`. Default: `auto`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Background {
    Transparent,
    Opaque,
    Auto,
}

impl Default for Background {
    fn default() -> Background {
        Self::Transparent
    }
}