Skip to main content

windmill_api/models/
ai_agent_input_transforms.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.815.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AiAgentInputTransforms : Input parameters for the AI agent mapped to their values
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AiAgentInputTransforms {
17    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
18    pub provider: Option<Box<models::ProviderTransform>>,
19    /// Output format type. Valid values: 'text' (default) - plain text response, 'image' - image generation 
20    #[serde(rename = "output_type", skip_serializing_if = "Option::is_none")]
21    pub output_type: Option<Box<models::InputTransform>>,
22    /// The user's prompt/message to the AI agent. Supports variable interpolation with flow.input syntax. Required unless memory is off and `previous_messages` supplies the prompt; image output always needs it. 
23    #[serde(rename = "user_message", skip_serializing_if = "Option::is_none")]
24    pub user_message: Option<Box<models::InputTransform>>,
25    /// System instructions that guide the AI's behavior, persona, and response style. Optional.
26    #[serde(rename = "system_prompt", skip_serializing_if = "Option::is_none")]
27    pub system_prompt: Option<Box<models::InputTransform>>,
28    /// Boolean. If true, stream the AI response incrementally. Streaming events include: token_delta, reasoning_token_delta, tool_call, tool_call_arguments, tool_execution, tool_result 
29    #[serde(rename = "streaming", skip_serializing_if = "Option::is_none")]
30    pub streaming: Option<Box<models::InputTransform>>,
31    #[serde(rename = "memory", skip_serializing_if = "Option::is_none")]
32    pub memory: Option<Box<models::MemoryTransform>>,
33    /// String. Names the memory this step reads and writes, overriding the memory id the run was started with (the chat conversation, an app chat session or the `memory_id` run parameter). Leave unset to use the run's memory id. A fixed value shares one memory across every run; an expression such as `flow_input.customer_id` keeps one memory per key. When it evaluates to an empty value the agent runs without memory. Read only while `memory` is `window`: it is ignored when memory is off, and an older `auto` or `manual` memory reads neither history input. 
34    #[serde(rename = "memory_id", skip_serializing_if = "Option::is_none")]
35    pub memory_id: Option<Box<models::InputTransform>>,
36    /// Array of MemoryMessage. History supplied by the flow, sent between the system prompt and the user message. Read only while `memory` is off or absent: managed memory ignores it, and an older `auto` or `manual` memory reads neither history input. 
37    #[serde(rename = "previous_messages", skip_serializing_if = "Option::is_none")]
38    pub previous_messages: Option<Box<models::InputTransform>>,
39    /// JSON Schema object defining structured output format. Used when you need the AI to return data in a specific shape. Supports standard JSON Schema properties: type, properties, required, items, enum, pattern, minLength, maxLength, minimum, maximum, etc. Example: { type: 'object', properties: { name: { type: 'string' }, age: { type: 'integer' } }, required: ['name'] } 
40    #[serde(rename = "output_schema", skip_serializing_if = "Option::is_none")]
41    pub output_schema: Option<Box<models::InputTransform>>,
42    /// Array of file references (images or PDFs) for the AI agent. Format: Array<{ bucket: string, key: string }> - S3 object references Example: [{ bucket: 'my-bucket', key: 'documents/report.pdf' }] 
43    #[serde(rename = "user_attachments", skip_serializing_if = "Option::is_none")]
44    pub user_attachments: Option<Box<models::InputTransform>>,
45    /// Array of strings naming which of the tools configured in `tools` the agent may call this run. Leaving it unset carries every one of them; an empty array carries none. A tool is named as the model is shown it. An entry the model is shown nothing of is named by what identifies it instead: an MCP server by its resource path, carrying every tool it exposes (which of them stays that entry's include_tools/exclude_tools), and a websearch entry by the reserved name '__wm_web_search', whatever summary it carries (no tool may take that name). Example: ['get_user', 'u/admin/github_mcp', '__wm_web_search'] 
46    #[serde(rename = "enabled_tools", skip_serializing_if = "Option::is_none")]
47    pub enabled_tools: Option<Box<models::InputTransform>>,
48    /// Integer. Maximum number of tokens the AI will generate in its response. Range: 1 to 4,294,967,295. Typical values: 256-4096 for most use cases. 
49    #[serde(rename = "max_completion_tokens", skip_serializing_if = "Option::is_none")]
50    pub max_completion_tokens: Option<Box<models::InputTransform>>,
51    /// Float. Controls randomness/creativity of responses. Range: 0.0 to 2.0 (provider-dependent) - 0.0 = deterministic, focused responses - 0.7 = balanced (common default) - 1.0+ = more creative/random 
52    #[serde(rename = "temperature", skip_serializing_if = "Option::is_none")]
53    pub temperature: Option<Box<models::InputTransform>>,
54    /// Number. Limits how many times the agent can loop through reasoning and tool use. Range: 1-1000. 
55    #[serde(rename = "max_iterations", skip_serializing_if = "Option::is_none")]
56    pub max_iterations: Option<Box<models::InputTransform>>,
57}
58
59impl AiAgentInputTransforms {
60    /// Input parameters for the AI agent mapped to their values
61    pub fn new() -> AiAgentInputTransforms {
62        AiAgentInputTransforms {
63            provider: None,
64            output_type: None,
65            user_message: None,
66            system_prompt: None,
67            streaming: None,
68            memory: None,
69            memory_id: None,
70            previous_messages: None,
71            output_schema: None,
72            user_attachments: None,
73            enabled_tools: None,
74            max_completion_tokens: None,
75            temperature: None,
76            max_iterations: None,
77        }
78    }
79}
80