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.626.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")]
18 pub provider: Box<models::ProviderTransform>,
19 /// Output format type. Valid values: 'text' (default) - plain text response, 'image' - image generation
20 #[serde(rename = "output_type")]
21 pub output_type: 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, 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 image references for vision-capable models. Format: Array<{ bucket: string, key: string }> - S3 object references Example: [{ bucket: 'my-bucket', key: 'images/photo.jpg' }]
37 #[serde(rename = "user_images", skip_serializing_if = "Option::is_none")]
38 pub user_images: Option<Box<models::InputTransform>>,
39 /// 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.
40 #[serde(rename = "max_completion_tokens", skip_serializing_if = "Option::is_none")]
41 pub max_completion_tokens: Option<Box<models::InputTransform>>,
42 /// 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
43 #[serde(rename = "temperature", skip_serializing_if = "Option::is_none")]
44 pub temperature: Option<Box<models::InputTransform>>,
45}
46
47impl AiAgentInputTransforms {
48 /// Input parameters for the AI agent mapped to their values
49 pub fn new(provider: models::ProviderTransform, output_type: models::InputTransform, user_message: models::InputTransform) -> AiAgentInputTransforms {
50 AiAgentInputTransforms {
51 provider: Box::new(provider),
52 output_type: Box::new(output_type),
53 user_message: Box::new(user_message),
54 system_prompt: None,
55 streaming: None,
56 memory: None,
57 output_schema: None,
58 user_images: None,
59 max_completion_tokens: None,
60 temperature: None,
61 }
62 }
63}
64