vapi_client/models/
response_text_delta_event.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ResponseTextDeltaEvent {
16 #[serde(rename = "content_index")]
18 pub content_index: f64,
19 #[serde(rename = "delta")]
21 pub delta: String,
22 #[serde(rename = "item_id")]
24 pub item_id: String,
25 #[serde(rename = "output_index")]
27 pub output_index: f64,
28 #[serde(rename = "type")]
30 pub r#type: TypeTrue,
31}
32
33impl ResponseTextDeltaEvent {
34 pub fn new(
35 content_index: f64,
36 delta: String,
37 item_id: String,
38 output_index: f64,
39 r#type: TypeTrue,
40 ) -> ResponseTextDeltaEvent {
41 ResponseTextDeltaEvent {
42 content_index,
43 delta,
44 item_id,
45 output_index,
46 r#type,
47 }
48 }
49}
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
52pub enum TypeTrue {
53 #[serde(rename = "response.output_text.delta")]
54 ResponsePeriodOutputTextPeriodDelta,
55}
56
57impl Default for TypeTrue {
58 fn default() -> TypeTrue {
59 Self::ResponsePeriodOutputTextPeriodDelta
60 }
61}