windmill_api/models/memory_auto.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.816.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// MemoryAuto : Deprecated, still read as it was written: the run's memory id, else the `memory_id` here. The step's own `memory_id` is not read while this kind is set; switch the kind to `window` to use it. Without a `context_length`, or with 0, it is `off` and reads `previous_messages`.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct MemoryAuto {
17 #[serde(rename = "kind")]
18 pub kind: Kind,
19 /// Maximum number of messages to retain in context
20 #[serde(rename = "context_length", skip_serializing_if = "Option::is_none")]
21 pub context_length: Option<i32>,
22 /// Identifier for persistent memory across agent invocations
23 #[serde(rename = "memory_id", skip_serializing_if = "Option::is_none")]
24 pub memory_id: Option<String>,
25}
26
27impl MemoryAuto {
28 /// Deprecated, still read as it was written: the run's memory id, else the `memory_id` here. The step's own `memory_id` is not read while this kind is set; switch the kind to `window` to use it. Without a `context_length`, or with 0, it is `off` and reads `previous_messages`.
29 pub fn new(kind: Kind) -> MemoryAuto {
30 MemoryAuto {
31 kind,
32 context_length: None,
33 memory_id: None,
34 }
35 }
36}
37///
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum Kind {
40 #[serde(rename = "auto")]
41 Auto,
42}
43
44impl Default for Kind {
45 fn default() -> Kind {
46 Self::Auto
47 }
48}
49