openai-client-base 0.8.1

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

/// ToolChoiceParam : How the model should select which tool (or tools) to use when generating a response. See the `tools` parameter to see how to specify which tools the model can call.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum ToolChoiceParam {
    ToolChoiceOptions(Box<models::ToolChoiceOptions>),
    ToolChoiceAllowed(Box<models::ToolChoiceAllowed>),
    ToolChoiceTypes(Box<models::ToolChoiceTypes>),
    ToolChoiceFunction(Box<models::ToolChoiceFunction>),
    ToolChoiceMcp(Box<models::ToolChoiceMcp>),
    ToolChoiceCustom(Box<models::ToolChoiceCustom>),
    SpecificApplyPatchParam(Box<models::SpecificApplyPatchParam>),
    SpecificFunctionShellParam(Box<models::SpecificFunctionShellParam>),
}

/// Constrains the tools available to the model to a pre-defined set.  `auto` allows the model to pick from among the allowed tools and generate a message.  `required` requires the model to call one or more of the allowed tools.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Mode {
    Auto,
    Required,
}