Skip to main content

mistral_openapi_client/models/
conversation_restart_stream_request.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ConversationRestartStreamRequest {
16    #[serde(rename = "inputs", skip_serializing_if = "Option::is_none")]
17    pub inputs: Option<Box<models::ConversationInputs>>,
18    #[serde(rename = "stream", skip_serializing_if = "Option::is_none")]
19    pub stream: Option<Stream>,
20    /// Whether to store the results into our servers or not.
21    #[serde(rename = "store", skip_serializing_if = "Option::is_none")]
22    pub store: Option<bool>,
23    #[serde(rename = "handoff_execution", skip_serializing_if = "Option::is_none")]
24    pub handoff_execution: Option<HandoffExecution>,
25    /// Completion arguments that will be used to generate assistant responses. Can be overridden at each message request.
26    #[serde(rename = "completion_args", skip_serializing_if = "Option::is_none")]
27    pub completion_args: Option<Box<models::CompletionArgs>>,
28    #[serde(rename = "guardrails", skip_serializing_if = "Option::is_none")]
29    pub guardrails: Option<Vec<models::GuardrailConfig>>,
30    /// Custom type for metadata with embedded validation.
31    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
32    pub metadata: Option<std::collections::HashMap<String, serde_json::Value>>,
33    #[serde(rename = "from_entry_id")]
34    pub from_entry_id: String,
35    #[serde(rename = "agent_version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub agent_version: Option<Option<Box<models::AgentVersion2>>>,
37}
38
39impl ConversationRestartStreamRequest {
40    pub fn new(from_entry_id: String) -> ConversationRestartStreamRequest {
41        ConversationRestartStreamRequest {
42            inputs: None,
43            stream: None,
44            store: None,
45            handoff_execution: None,
46            completion_args: None,
47            guardrails: None,
48            metadata: None,
49            from_entry_id,
50            agent_version: None,
51        }
52    }
53}
54/// 
55#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
56pub enum Stream {
57    #[serde(rename = "true")]
58    True,
59}
60
61impl Default for Stream {
62    fn default() -> Stream {
63        Self::True
64    }
65}
66/// 
67#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
68pub enum HandoffExecution {
69    #[serde(rename = "client")]
70    Client,
71    #[serde(rename = "server")]
72    Server,
73}
74
75impl Default for HandoffExecution {
76    fn default() -> HandoffExecution {
77        Self::Client
78    }
79}
80