Skip to main content

windmill_api/models/
ai_web_search_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.863.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AiWebSearchConfig : The search API the AI chat searches the web and reads pages through when the model's provider has no built-in web search. Read from the workspace's own settings like `copilot_disabled`.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AiWebSearchConfig {
17    #[serde(rename = "provider")]
18    pub provider: Provider,
19    #[serde(rename = "resource_path")]
20    pub resource_path: String,
21}
22
23impl AiWebSearchConfig {
24    /// The search API the AI chat searches the web and reads pages through when the model's provider has no built-in web search. Read from the workspace's own settings like `copilot_disabled`.
25    pub fn new(provider: Provider, resource_path: String) -> AiWebSearchConfig {
26        AiWebSearchConfig {
27            provider,
28            resource_path,
29        }
30    }
31}
32/// 
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum Provider {
35    #[serde(rename = "exa")]
36    Exa,
37    #[serde(rename = "tavily")]
38    Tavily,
39    #[serde(rename = "linkup")]
40    Linkup,
41    #[serde(rename = "deepseek")]
42    Deepseek,
43}
44
45impl Default for Provider {
46    fn default() -> Provider {
47        Self::Exa
48    }
49}
50