Skip to main content

windmill_api/models/
ai_decision_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.824.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AiDecisionInputTransforms : Input parameters for the decision mapped to their values
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AiDecisionInputTransforms {
17    #[serde(rename = "provider")]
18    pub provider: Box<models::ProviderTransform>,
19    /// What the questions are asked about: a string, an object or an array of strings. An object with descriptive keys holding only what the questions need works best. Example: { message: flow_input.message, plan: results.a.plan } 
20    #[serde(rename = "state")]
21    pub state: Box<models::InputTransform>,
22    /// Object mapping each question name to { type, instructions, criteria }, where type is: - 'choice': criteria maps each option to its description (up to 255); the answer   has choice, probabilities and confidence - 'score': criteria is an ordered array of 2 to 10 level descriptions; the answer   has score, legend, probabilities and confidence - 'noul': yes/no, criteria optionally { true, false } descriptions; the answer has   noul, the probability of yes (0 to 1) Example: { intent: { type: 'choice', instructions: 'What does the customer want?', criteria: { refund: 'Money back', bug: 'Something is broken' } } } 
23    #[serde(rename = "questions")]
24    pub questions: Box<models::InputTransform>,
25}
26
27impl AiDecisionInputTransforms {
28    /// Input parameters for the decision mapped to their values
29    pub fn new(provider: models::ProviderTransform, state: models::InputTransform, questions: models::InputTransform) -> AiDecisionInputTransforms {
30        AiDecisionInputTransforms {
31            provider: Box::new(provider),
32            state: Box::new(state),
33            questions: Box::new(questions),
34        }
35    }
36}
37