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

/// Item : Content item used to generate a response.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
#[allow(unreachable_patterns)]
pub enum Item {
    InputMessage(Box<models::InputMessage>),
    OutputMessage(Box<models::OutputMessage>),
    FileSearchToolCall(Box<models::FileSearchToolCall>),
    ComputerToolCall(Box<models::ComputerToolCall>),
    ComputerCallOutputItemParam(Box<models::ComputerCallOutputItemParam>),
    WebSearchToolCall(Box<models::WebSearchToolCall>),
    FunctionToolCall(Box<models::FunctionToolCall>),
    FunctionCallOutputItemParam(Box<models::FunctionCallOutputItemParam>),
    ToolSearchCallItemParam(Box<models::ToolSearchCallItemParam>),
    ToolSearchOutputItemParam(Box<models::ToolSearchOutputItemParam>),
    ReasoningItem(Box<models::ReasoningItem>),
    CompactionSummaryItemParam(Box<models::CompactionSummaryItemParam>),
    ImageGenToolCall(Box<models::ImageGenToolCall>),
    CodeInterpreterToolCall(Box<models::CodeInterpreterToolCall>),
    LocalShellToolCall(Box<models::LocalShellToolCall>),
    LocalShellToolCallOutput(Box<models::LocalShellToolCallOutput>),
    FunctionShellCallItemParam(Box<models::FunctionShellCallItemParam>),
    FunctionShellCallOutputItemParam(Box<models::FunctionShellCallOutputItemParam>),
    ApplyPatchToolCallItemParam(Box<models::ApplyPatchToolCallItemParam>),
    ApplyPatchToolCallOutputItemParam(Box<models::ApplyPatchToolCallOutputItemParam>),
    McpListTools(Box<models::McpListTools>),
    McpApprovalRequest(Box<models::McpApprovalRequest>),
    McpApprovalResponse(Box<models::McpApprovalResponse>),
    McpToolCall(Box<models::McpToolCall>),
    CustomToolCallOutput(Box<models::CustomToolCallOutput>),
    CustomToolCall(Box<models::CustomToolCall>),
}

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