pub struct RunSummary {
pub rounds: usize,
pub tool_calls: usize,
pub usage: Usage,
pub usage_omitted: bool,
pub cache_omitted: bool,
pub finish_reason: Option<FinishReason>,
pub latency: Duration,
pub provider_model: Option<String>,
}Expand description
Execution summary for one run.
Fields§
§rounds: usizeNumber of conversation rounds.
tool_calls: usizeTotal number of tool executions.
usage: UsageSum of reported token usage across provider turns.
Always the sum of the parts that were reported: turns whose provider
did not return usage contribute nothing. Only exact when
usage_omitted is false; otherwise it is a
lower bound. The cached-token part has its own, finer-grained latch in
cache_omitted.
usage_omitted: booltrue = at least one provider turn did not report usage (the endpoint
omitted it), so usage is a lower bound rather than
the run’s exact usage.
cache_omitted: booltrue = at least one provider turn did not report the prompt-cache
breakdown, so usage.cached_tokens is a lower bound: it is the sum of
the turns that did report one (None when no turn did).
Implied by usage_omitted — a turn that
reported no usage at all reported no cache breakdown either.
finish_reason: Option<FinishReason>Final direct-answer provider finish reason, when available.
latency: DurationWall-clock run latency.
provider_model: Option<String>Provider model identifier, when the provider exposes one.
Trait Implementations§
Source§impl Clone for RunSummary
impl Clone for RunSummary
Source§fn clone(&self) -> RunSummary
fn clone(&self) -> RunSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RunSummary
impl Debug for RunSummary
Source§impl Default for RunSummary
impl Default for RunSummary
Source§fn default() -> RunSummary
fn default() -> RunSummary
Source§impl<'de> Deserialize<'de> for RunSummary
impl<'de> Deserialize<'de> for RunSummary
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RunSummary, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RunSummary, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for RunSummary
Source§impl PartialEq for RunSummary
impl PartialEq for RunSummary
Source§impl Serialize for RunSummary
impl Serialize for RunSummary
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for RunSummary
Auto Trait Implementations§
impl Freeze for RunSummary
impl RefUnwindSafe for RunSummary
impl Send for RunSummary
impl Sync for RunSummary
impl Unpin for RunSummary
impl UnsafeUnpin for RunSummary
impl UnwindSafe for RunSummary
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.