windmill_api/models/
ai_agent.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.592.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AiAgent : AI agent step that can use tools to accomplish tasks. The agent receives inputs and can call any of its configured tools to complete the task
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AiAgent {
17    #[serde(rename = "input_transforms")]
18    pub input_transforms: Box<models::AiAgentInputTransforms>,
19    /// Array of tools the agent can use. The agent decides which tools to call based on the task
20    #[serde(rename = "tools")]
21    pub tools: Vec<models::AgentTool>,
22    #[serde(rename = "type")]
23    pub r#type: Type,
24    /// If true, the agent can execute multiple tool calls in parallel
25    #[serde(rename = "parallel", skip_serializing_if = "Option::is_none")]
26    pub parallel: Option<bool>,
27}
28
29impl AiAgent {
30    /// AI agent step that can use tools to accomplish tasks. The agent receives inputs and can call any of its configured tools to complete the task
31    pub fn new(input_transforms: models::AiAgentInputTransforms, tools: Vec<models::AgentTool>, r#type: Type) -> AiAgent {
32        AiAgent {
33            input_transforms: Box::new(input_transforms),
34            tools,
35            r#type,
36            parallel: None,
37        }
38    }
39}
40/// 
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Type {
43    #[serde(rename = "aiagent")]
44    Aiagent,
45}
46
47impl Default for Type {
48    fn default() -> Type {
49        Self::Aiagent
50    }
51}
52