mistral-openapi-client 0.1.0

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.
Documentation
/*
 * Mistral AI API
 *
 * 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.
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ModerationLlmv1Config {
    /// Override model name. Should be omitted in general.
    #[serde(rename = "model_name", skip_serializing_if = "Option::is_none")]
    pub model_name: Option<String>,
    #[serde(rename = "custom_category_thresholds", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub custom_category_thresholds: Option<Option<Box<models::ModerationLlmv1CategoryThresholds>>>,
    /// If true, only evaluate categories in custom_category_thresholds; others are ignored.
    #[serde(rename = "ignore_other_categories", skip_serializing_if = "Option::is_none")]
    pub ignore_other_categories: Option<bool>,
    /// Action to take if any score is above the threshold for any category.
    #[serde(rename = "action", skip_serializing_if = "Option::is_none")]
    pub action: Option<models::ModerationLlmAction>,
}

impl ModerationLlmv1Config {
    pub fn new() -> ModerationLlmv1Config {
        ModerationLlmv1Config {
            model_name: None,
            custom_category_thresholds: None,
            ignore_other_categories: None,
            action: None,
        }
    }
}