Skip to main content

mistral_openapi_client/models/
tool_choice_enum.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// 
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum ToolChoiceEnum {
17    #[serde(rename = "auto")]
18    Auto,
19    #[serde(rename = "none")]
20    None,
21    #[serde(rename = "any")]
22    Any,
23    #[serde(rename = "required")]
24    Required,
25
26}
27
28impl std::fmt::Display for ToolChoiceEnum {
29    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
30        match self {
31            Self::Auto => write!(f, "auto"),
32            Self::None => write!(f, "none"),
33            Self::Any => write!(f, "any"),
34            Self::Required => write!(f, "required"),
35        }
36    }
37}
38
39impl Default for ToolChoiceEnum {
40    fn default() -> ToolChoiceEnum {
41        Self::Auto
42    }
43}
44