Skip to main content

mistral_openapi_client/models/
conversation_append_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 ConversationAppendStreamRequest {
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 = "tool_confirmations", skip_serializing_if = "Option::is_none")]
29    pub tool_confirmations: Option<Vec<models::ToolCallConfirmation>>,
30}
31
32impl ConversationAppendStreamRequest {
33    pub fn new() -> ConversationAppendStreamRequest {
34        ConversationAppendStreamRequest {
35            inputs: None,
36            stream: None,
37            store: None,
38            handoff_execution: None,
39            completion_args: None,
40            tool_confirmations: None,
41        }
42    }
43}
44/// 
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum Stream {
47    #[serde(rename = "true")]
48    True,
49}
50
51impl Default for Stream {
52    fn default() -> Stream {
53        Self::True
54    }
55}
56/// 
57#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
58pub enum HandoffExecution {
59    #[serde(rename = "client")]
60    Client,
61    #[serde(rename = "server")]
62    Server,
63}
64
65impl Default for HandoffExecution {
66    fn default() -> HandoffExecution {
67        Self::Client
68    }
69}
70