Skip to main content

windmill_api/models/
ai_config.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.805.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AiConfig {
16    #[serde(rename = "providers", skip_serializing_if = "Option::is_none")]
17    pub providers: Option<std::collections::HashMap<String, models::AiProviderConfig>>,
18    #[serde(rename = "default_model", skip_serializing_if = "Option::is_none")]
19    pub default_model: Option<Box<models::AiProviderModel>>,
20    #[serde(rename = "metadata_model", skip_serializing_if = "Option::is_none")]
21    pub metadata_model: Option<Box<models::AiProviderModel>>,
22    #[serde(rename = "code_completion_model", skip_serializing_if = "Option::is_none")]
23    pub code_completion_model: Option<Box<models::AiProviderModel>>,
24    #[serde(rename = "custom_prompts", skip_serializing_if = "Option::is_none")]
25    pub custom_prompts: Option<std::collections::HashMap<String, String>>,
26    #[serde(rename = "max_tokens_per_model", skip_serializing_if = "Option::is_none")]
27    pub max_tokens_per_model: Option<std::collections::HashMap<String, i32>>,
28    #[serde(rename = "free_tier", skip_serializing_if = "Option::is_none")]
29    pub free_tier: Option<Box<models::FreeTierInfo>>,
30    #[serde(rename = "model_pricing", skip_serializing_if = "Option::is_none")]
31    pub model_pricing: Option<std::collections::HashMap<String, models::ModelPriceOverride>>,
32    /// Hides the Windmill AI assistant (chat, sessions, code generation, completion, fixes) from the workspace UI. Read from the workspace's own settings even when the providers served fall back to the instance config. AI agent steps and the AI sandbox in flows are unaffected.
33    #[serde(rename = "copilot_disabled", skip_serializing_if = "Option::is_none")]
34    pub copilot_disabled: Option<bool>,
35}
36
37impl AiConfig {
38    pub fn new() -> AiConfig {
39        AiConfig {
40            providers: None,
41            default_model: None,
42            metadata_model: None,
43            code_completion_model: None,
44            custom_prompts: None,
45            max_tokens_per_model: None,
46            free_tier: None,
47            model_pricing: None,
48            copilot_disabled: None,
49        }
50    }
51}
52