#[derive(Debug, Clone, PartialEq)]
pub enum StreamDelta {
Content { text: String, token_ids: Vec<u32> },
Reasoning { text: String, token_ids: Vec<u32> },
ToolCallStart {
index: usize,
id: String,
name: String,
},
ToolCallArgs {
index: usize,
fragment: String,
token_ids: Vec<u32>,
},
Refusal { text: String },
Finish {
reason: super::response::FinishReason,
usage: super::response::Usage,
token_ids: Vec<u32>,
},
Error { message: String },
}
pub type DeltaStream = std::pin::Pin<Box<dyn futures::Stream<Item = StreamDelta> + Send>>;