Skip to main content

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.699.0
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, this AI agent step does not persist its assistant or tool messages to the flow conversation when chat mode is enabled.
25    #[serde(rename = "omit_output_from_conversation", skip_serializing_if = "Option::is_none")]
26    pub omit_output_from_conversation: Option<bool>,
27    /// If true, the agent can execute multiple tool calls in parallel
28    #[serde(rename = "parallel", skip_serializing_if = "Option::is_none")]
29    pub parallel: Option<bool>,
30}
31
32impl AiAgent {
33    /// 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
34    pub fn new(input_transforms: models::AiAgentInputTransforms, tools: Vec<models::AgentTool>, r#type: Type) -> AiAgent {
35        AiAgent {
36            input_transforms: Box::new(input_transforms),
37            tools,
38            r#type,
39            omit_output_from_conversation: None,
40            parallel: None,
41        }
42    }
43}
44/// 
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum Type {
47    #[serde(rename = "aiagent")]
48    Aiagent,
49}
50
51impl Default for Type {
52    fn default() -> Type {
53        Self::Aiagent
54    }
55}
56