vapi_client/models/
client_message_model_output.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ClientMessageModelOutput {
17    /// This is the type of the message. \"model-output\" is sent as the model outputs tokens.
18    #[serde(rename = "type")]
19    pub r#type: Type,
20    /// This is the output of the model. It can be a token or tool call.
21    #[serde(rename = "output")]
22    pub output: serde_json::Value,
23}
24
25impl ClientMessageModelOutput {
26    pub fn new(r#type: Type, output: serde_json::Value) -> ClientMessageModelOutput {
27        ClientMessageModelOutput { r#type, output }
28    }
29}
30/// This is the type of the message. \"model-output\" is sent as the model outputs tokens.
31#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
32pub enum Type {
33    #[serde(rename = "model-output")]
34    ModelOutput,
35}
36
37impl Default for Type {
38    fn default() -> Type {
39        Self::ModelOutput
40    }
41}