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.813.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.
23    #[serde(rename = "user_message")]
24    pub user_message: 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    /// 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'] } 
34    #[serde(rename = "output_schema", skip_serializing_if = "Option::is_none")]
35    pub output_schema: Option<Box<models::InputTransform>>,
36    /// 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' }] 
37    #[serde(rename = "user_attachments", skip_serializing_if = "Option::is_none")]
38    pub user_attachments: Option<Box<models::InputTransform>>,
39    /// 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'] 
40    #[serde(rename = "enabled_tools", skip_serializing_if = "Option::is_none")]
41    pub enabled_tools: Option<Box<models::InputTransform>>,
42    /// 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. 
43    #[serde(rename = "max_completion_tokens", skip_serializing_if = "Option::is_none")]
44    pub max_completion_tokens: Option<Box<models::InputTransform>>,
45    /// 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 
46    #[serde(rename = "temperature", skip_serializing_if = "Option::is_none")]
47    pub temperature: Option<Box<models::InputTransform>>,
48    /// Number. Limits how many times the agent can loop through reasoning and tool use. Range: 1-1000. 
49    #[serde(rename = "max_iterations", skip_serializing_if = "Option::is_none")]
50    pub max_iterations: Option<Box<models::InputTransform>>,
51}
52
53impl AiAgentInputTransforms {
54    /// Input parameters for the AI agent mapped to their values
55    pub fn new(user_message: models::InputTransform) -> AiAgentInputTransforms {
56        AiAgentInputTransforms {
57            provider: None,
58            output_type: None,
59            user_message: Box::new(user_message),
60            system_prompt: None,
61            streaming: None,
62            memory: None,
63            output_schema: None,
64            user_attachments: None,
65            enabled_tools: None,
66            max_completion_tokens: None,
67            temperature: None,
68            max_iterations: None,
69        }
70    }
71}
72