pub struct Snapshot {
pub run_id: RunId,
pub session_id: Uuid,
pub status: RunStatus,
pub iteration: usize,
pub current_state: TurnState,
pub total_usage: TokenUsage,
pub last_finish: Option<FinishReason>,
pub assistant_message: Option<Message>,
pub assistant_msg_id: Option<Uuid>,
pub request: RunRequest,
pub output_recovery_count: u32,
pub timestamp: DateTime<Utc>,
}Expand description
A serialized execution snapshot of an active agent run.
Fields§
§run_id: RunIdUnique identifier for the run.
session_id: UuidSession ID associated with the run.
status: RunStatusCurrent run status.
iteration: usizeCurrent iteration count.
current_state: TurnStateCurrent turn state within the loop.
total_usage: TokenUsageAccumulated token usage so far.
last_finish: Option<FinishReason>Last finish reason returned by the model, if any.
assistant_message: Option<Message>Optional last committed assistant message.
assistant_msg_id: Option<Uuid>Optional ID of the last committed assistant message in the store.
request: RunRequestThe original run request.
output_recovery_count: u32Number of output recovery attempts made so far for truncated responses.
timestamp: DateTime<Utc>Timestamp when this snapshot was captured.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Snapshot
impl<'de> Deserialize<'de> for Snapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more