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.834.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` or `compaction`: 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    /// String. Only on a step linked to a saved agent (see `agent`): replaces the model saved on the agent for this step's runs, on the agent's own provider resource. An empty value keeps the saved model. Set it to an expression such as `flow_input.model` to choose the model per run. 
58    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
59    pub model: Option<Box<models::InputTransform>>,
60    /// String. Only on a step linked to a saved agent (see `agent`): replaces the reasoning effort saved on the agent for this step's runs, as a provider-native token (e.g. 'low', 'high', 'none'). An empty value sends no effort, so the model runs at its default. Leave the input out to keep the saved effort, which holds only while the step runs the saved model. A step that is not linked sets both inside `provider`. 
61    #[serde(rename = "reasoning_effort", skip_serializing_if = "Option::is_none")]
62    pub reasoning_effort: Option<Box<models::InputTransform>>,
63}
64
65impl AiAgentInputTransforms {
66    /// Input parameters for the AI agent mapped to their values
67    pub fn new() -> AiAgentInputTransforms {
68        AiAgentInputTransforms {
69            provider: None,
70            output_type: None,
71            user_message: None,
72            system_prompt: None,
73            streaming: None,
74            memory: None,
75            memory_id: None,
76            previous_messages: None,
77            output_schema: None,
78            user_attachments: None,
79            enabled_tools: None,
80            max_completion_tokens: None,
81            temperature: None,
82            max_iterations: None,
83            model: None,
84            reasoning_effort: None,
85        }
86    }
87}
88