Skip to main content

windmill_api/models/
agent_draft.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.796.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AgentDraft : The brain and tools of an agent, as the flow editor holds them. Carried by the request and present exactly when the subject kind is `agent_draft` — the edits exist only in the editor — where it is the whole definition of what ran: the run goes through the same unlinked branch of the agent executor the editor's own test uses. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AgentDraft {
17    /// The agent's input transforms: provider, system prompt, output type and the rest. The message and attachments come from the case and override anything named here. 
18    #[serde(rename = "input_transforms", skip_serializing_if = "Option::is_none")]
19    pub input_transforms: Option<std::collections::HashMap<String, serde_json::Value>>,
20    #[serde(rename = "tools", skip_serializing_if = "Option::is_none")]
21    pub tools: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
22}
23
24impl AgentDraft {
25    /// The brain and tools of an agent, as the flow editor holds them. Carried by the request and present exactly when the subject kind is `agent_draft` — the edits exist only in the editor — where it is the whole definition of what ran: the run goes through the same unlinked branch of the agent executor the editor's own test uses. 
26    pub fn new() -> AgentDraft {
27        AgentDraft {
28            input_transforms: None,
29            tools: None,
30        }
31    }
32}
33