pub struct CostEvent {
pub scope: Option<String>,
pub provider: Option<String>,
pub model: String,
pub prompt_tokens: usize,
pub completion_tokens: usize,
pub cost_usd: f64,
}Expand description
Priced cost of one LLM call (emitted by CostTracker).
Fields§
§scope: Option<String>Run/session label when the tracker was scoped with one.
provider: Option<String>Provider slug ("openai", …); None when undeclared.
model: StringModel id as reported by the model.
prompt_tokens: usizePrompt tokens of the call.
completion_tokens: usizeCompletion tokens of the call.
cost_usd: f64Priced USD cost (0.0 when no price entry matched).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CostEvent
impl RefUnwindSafe for CostEvent
impl Send for CostEvent
impl Sync for CostEvent
impl Unpin for CostEvent
impl UnsafeUnpin for CostEvent
impl UnwindSafe for CostEvent
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