pub struct MessageAlternative {
pub content: String,
pub images: Vec<ImageRef>,
pub content_blocks: Vec<ContentBlock>,
pub timestamp: String,
pub provider_key: Option<String>,
pub model: Option<String>,
}Expand description
Stored alternate body for a regenerated assistant message.
Message keeps the currently selected alternative in its top-level
content/content_blocks fields so existing clients and prompt assembly
keep reading the active response. alternatives stores every selectable
candidate, including the active one.
Fields§
§content: String§images: Vec<ImageRef>§content_blocks: Vec<ContentBlock>§timestamp: String§provider_key: Option<String>Provider key that minted this alternative’s content. A regenerated
assistant body can be produced under a different provider than the
original message or a sibling alternative, so each alternative carries
its own provenance rather than inheriting the single
Message::provider_key. The replay portability filter uses this to
drop opaque thinking data the active provider cannot interpret. None
for alternatives persisted before per-alternative provenance tracking,
in which case callers fall back to Message::provider_key.
model: Option<String>Model id that minted this alternative’s content. Like
MessageAlternative::provider_key, each alternative carries its own
provenance because regenerated bodies can come from different models.
None for alternatives persisted before model provenance tracking, in
which case callers fall back to Message::model.
Implementations§
Source§impl MessageAlternative
impl MessageAlternative
Sourcepub fn normalize(&mut self)
pub fn normalize(&mut self)
Ensure content and content_blocks are consistent after
deserialization, matching Message::normalize.
Trait Implementations§
Source§impl Clone for MessageAlternative
impl Clone for MessageAlternative
Source§fn clone(&self) -> MessageAlternative
fn clone(&self) -> MessageAlternative
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more