Skip to main content

mistral_openapi_client/models/
conversation_append_request_base.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 ConversationAppendRequestBase {
16    #[serde(rename = "inputs", skip_serializing_if = "Option::is_none")]
17    pub inputs: Option<Box<models::ConversationInputs>>,
18    /// Whether to stream back partial progress. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.
19    #[serde(rename = "stream", skip_serializing_if = "Option::is_none")]
20    pub stream: Option<bool>,
21    /// Whether to store the results into our servers or not.
22    #[serde(rename = "store", skip_serializing_if = "Option::is_none")]
23    pub store: Option<bool>,
24    #[serde(rename = "handoff_execution", skip_serializing_if = "Option::is_none")]
25    pub handoff_execution: Option<HandoffExecution>,
26    /// Completion arguments that will be used to generate assistant responses. Can be overridden at each message request.
27    #[serde(rename = "completion_args", skip_serializing_if = "Option::is_none")]
28    pub completion_args: Option<Box<models::CompletionArgs>>,
29    #[serde(rename = "tool_confirmations", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub tool_confirmations: Option<Option<Vec<models::ToolCallConfirmation>>>,
31}
32
33impl ConversationAppendRequestBase {
34    pub fn new() -> ConversationAppendRequestBase {
35        ConversationAppendRequestBase {
36            inputs: None,
37            stream: None,
38            store: None,
39            handoff_execution: None,
40            completion_args: None,
41            tool_confirmations: None,
42        }
43    }
44}
45/// 
46#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
47pub enum HandoffExecution {
48    #[serde(rename = "client")]
49    Client,
50    #[serde(rename = "server")]
51    Server,
52}
53
54impl Default for HandoffExecution {
55    fn default() -> HandoffExecution {
56        Self::Client
57    }
58}
59