vapi_client/models/
chat_completion_message_metadata.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 ChatCompletionMessageMetadata {
17    #[serde(rename = "taskName")]
18    pub task_name: String,
19    #[serde(rename = "taskType")]
20    pub task_type: String,
21    #[serde(rename = "taskOutput")]
22    pub task_output: String,
23    #[serde(rename = "taskState", skip_serializing_if = "Option::is_none")]
24    pub task_state: Option<serde_json::Value>,
25    #[serde(rename = "nodeTrace", skip_serializing_if = "Option::is_none")]
26    pub node_trace: Option<Vec<String>>,
27}
28
29impl ChatCompletionMessageMetadata {
30    pub fn new(
31        task_name: String,
32        task_type: String,
33        task_output: String,
34    ) -> ChatCompletionMessageMetadata {
35        ChatCompletionMessageMetadata {
36            task_name,
37            task_type,
38            task_output,
39            task_state: None,
40            node_trace: None,
41        }
42    }
43}