pub struct ResponseDelta {Show 22 fields
pub request_id: u64,
pub sequence_id: Option<u64>,
pub prompt_index: Option<u32>,
pub candidate_index: Option<u32>,
pub content: Option<String>,
pub content_len: Option<u32>,
pub inline_content_bytes: Option<u32>,
pub is_final_delta: bool,
pub finish_reason: Option<String>,
pub error: Option<String>,
pub prompt_token_count: Option<u32>,
pub num_tokens_in_delta: Option<u32>,
pub generation_len: Option<u32>,
pub tokens: Vec<i32>,
pub top_logprobs: Vec<TokenLogProb>,
pub cumulative_logprob: Option<f64>,
pub modal_decoder_id: Option<String>,
pub modal_bytes_b64: Option<String>,
pub embedding_bytes: Option<Vec<u8>>,
pub state_events: Vec<ResponseStateEvent>,
pub cached_token_count: Option<u32>,
pub reasoning_tokens: Option<u32>,
}Expand description
Response delta from PIE.
Uses serde for deserialization with sensible defaults for missing fields.
Fields§
§request_id: u64Request ID this delta belongs to
sequence_id: Option<u64>Sequence ID for ordering
prompt_index: Option<u32>Prompt index for batched requests (identifies which prompt in the batch)
candidate_index: Option<u32>Candidate index (for multi-candidate generation)
content: Option<String>Generated content (token text)
content_len: Option<u32>Content length in characters
inline_content_bytes: Option<u32>Inline content bytes
is_final_delta: boolWhether this is the final delta
finish_reason: Option<String>Finish reason (e.g., “stop”, “length”)
error: Option<String>Error message if request failed
prompt_token_count: Option<u32>Prompt token count
num_tokens_in_delta: Option<u32>Number of tokens in this delta
generation_len: Option<u32>Generation length so far
tokens: Vec<i32>Token IDs in this delta
top_logprobs: Vec<TokenLogProb>Top log probabilities for each token position
cumulative_logprob: Option<f64>Cumulative log probability
modal_decoder_id: Option<String>Modal decoder identifier (e.g., “moondream3.coord”)
modal_bytes_b64: Option<String>Base64-encoded modal decoder output bytes
embedding_bytes: Option<Vec<u8>>Raw embedding bytes from PIE, when request_type is embedding.
state_events: Vec<ResponseStateEvent>Structured state transition events used by Responses API.
cached_token_count: Option<u32>Cached token count (input token cache hits).
reasoning_tokens: Option<u32>Reasoning token count, when available.
Trait Implementations§
Source§impl Clone for ResponseDelta
impl Clone for ResponseDelta
Source§fn clone(&self) -> ResponseDelta
fn clone(&self) -> ResponseDelta
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more