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};

/// ItemResource : Content item used to generate a response.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ItemResource {
    InputMessageResource(Box<models::InputMessageResource>),
    OutputMessage(Box<models::OutputMessage>),
    FileSearchToolCall(Box<models::FileSearchToolCall>),
    ComputerToolCall(Box<models::ComputerToolCall>),
    ComputerToolCallOutputResource(Box<models::ComputerToolCallOutputResource>),
    WebSearchToolCall(Box<models::WebSearchToolCall>),
    FunctionToolCallResource(Box<models::FunctionToolCallResource>),
    FunctionToolCallOutputResource(Box<models::FunctionToolCallOutputResource>),
    ToolSearchCall(Box<models::ToolSearchCall>),
    ToolSearchOutput(Box<models::ToolSearchOutput>),
    ReasoningItem(Box<models::ReasoningItem>),
    CompactionBody(Box<models::CompactionBody>),
    ImageGenToolCall(Box<models::ImageGenToolCall>),
    CodeInterpreterToolCall(Box<models::CodeInterpreterToolCall>),
    LocalShellToolCall(Box<models::LocalShellToolCall>),
    LocalShellToolCallOutput(Box<models::LocalShellToolCallOutput>),
    FunctionShellCall(Box<models::FunctionShellCall>),
    FunctionShellCallOutput(Box<models::FunctionShellCallOutput>),
    ApplyPatchToolCall(Box<models::ApplyPatchToolCall>),
    ApplyPatchToolCallOutput(Box<models::ApplyPatchToolCallOutput>),
    McpListTools(Box<models::McpListTools>),
    McpApprovalRequest(Box<models::McpApprovalRequest>),
    McpApprovalResponseResource(Box<models::McpApprovalResponseResource>),
    McpToolCall(Box<models::McpToolCall>),
    CustomToolCallResource(Box<models::CustomToolCallResource>),
    CustomToolCallOutputResource(Box<models::CustomToolCallOutputResource>),
}

/// The role of the output message. Always `assistant`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Role {
    Assistant,
}

impl Default for Role {
    fn default() -> Role {
        Self::Assistant
    }
}