pub struct MessageMetadata {
pub is_writing: bool,
pub created_at: DateTime<Utc>,
pub reasoning_updated_at: DateTime<Utc>,
pub text_updated_at: DateTime<Utc>,
}Expand description
Metadata automatically tracked by MolyKit for each message.
“Metadata” basically means “data about data”. Like tracking timestamps for data modification.
Fields§
§is_writing: boolRuntime flag indicating that the message is still incomplete (being written).
Skipped during serialization.
created_at: DateTime<Utc>When the message got created.
Default to epoch if missing during deserialization. Otherwise, if constructed
by MessageMetadata::default, it defaults to “now”.
reasoning_updated_at: DateTime<Utc>Last time the reasoning/thinking content was updated.
Default to epoch if missing during deserialization. Otherwise, if constructed
by MessageMetadata::default, it defaults to “now”.
text_updated_at: DateTime<Utc>Last time the main text was updated.
Default to epoch if missing during deserialization. Otherwise, if constructed
by MessageMetadata::default, it defaults to “now”.
Implementations§
Source§impl MessageMetadata
impl MessageMetadata
Sourcepub fn new() -> Self
pub fn new() -> Self
Same behavior as MessageMetadata::default.
Source§impl MessageMetadata
impl MessageMetadata
Sourcepub fn reasoning_time_taken_seconds(&self) -> f32
pub fn reasoning_time_taken_seconds(&self) -> f32
The inferred amount of time the reasoning step took, in seconds (with milliseconds).
pub fn is_idle(&self) -> bool
pub fn is_writing(&self) -> bool
Trait Implementations§
Source§impl Clone for MessageMetadata
impl Clone for MessageMetadata
Source§fn clone(&self) -> MessageMetadata
fn clone(&self) -> MessageMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more