use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ResponseTextDeltaEvent {
#[serde(rename = "content_index")]
pub content_index: f64,
#[serde(rename = "delta")]
pub delta: String,
#[serde(rename = "item_id")]
pub item_id: String,
#[serde(rename = "output_index")]
pub output_index: f64,
#[serde(rename = "type")]
pub r#type: TypeTrue,
}
impl ResponseTextDeltaEvent {
pub fn new(
content_index: f64,
delta: String,
item_id: String,
output_index: f64,
r#type: TypeTrue,
) -> ResponseTextDeltaEvent {
ResponseTextDeltaEvent {
content_index,
delta,
item_id,
output_index,
r#type,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TypeTrue {
#[serde(rename = "response.output_text.delta")]
ResponsePeriodOutputTextPeriodDelta,
}
impl Default for TypeTrue {
fn default() -> TypeTrue {
Self::ResponsePeriodOutputTextPeriodDelta
}
}