pub struct CostData {
pub model: String,
pub provider: String,
pub total_usage: TokenUsage,
pub total_llm_latency_ms: u64,
pub cost_usd: Option<f64>,
pub pricing: Option<CostPricing>,
}Expand description
Accumulated cost data for a single agent run.
Fields§
§model: StringModel name used for the run.
provider: StringProvider identifier.
total_usage: TokenUsageTotal token usage across all LLM calls.
total_llm_latency_ms: u64Total LLM latency in milliseconds.
cost_usd: Option<f64>Computed cost in USD (None if pricing is unknown for the model).
pricing: Option<CostPricing>Pricing rates used for the computation (None if unknown).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CostData
impl<'de> Deserialize<'de> for CostData
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 CostData
impl RefUnwindSafe for CostData
impl Send for CostData
impl Sync for CostData
impl Unpin for CostData
impl UnsafeUnpin for CostData
impl UnwindSafe for CostData
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
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>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more