pub struct LlmCostRecord {
pub model: String,
pub provider: String,
pub prompt_tokens: usize,
pub completion_tokens: usize,
pub total_tokens: usize,
pub cost_usd: Option<f64>,
pub timestamp: DateTime<Utc>,
pub session_id: Option<String>,
}Expand description
Cost record for a single LLM call
Fields§
§model: StringModel identifier
provider: StringProvider name
prompt_tokens: usizeInput tokens
completion_tokens: usizeOutput tokens
total_tokens: usizeTotal tokens
cost_usd: Option<f64>Estimated cost in USD (if pricing is configured)
timestamp: DateTime<Utc>Timestamp
session_id: Option<String>Session ID
Trait Implementations§
Source§impl Clone for LlmCostRecord
impl Clone for LlmCostRecord
Source§fn clone(&self) -> LlmCostRecord
fn clone(&self) -> LlmCostRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LlmCostRecord
impl Debug for LlmCostRecord
Source§impl<'de> Deserialize<'de> for LlmCostRecord
impl<'de> Deserialize<'de> for LlmCostRecord
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 LlmCostRecord
impl RefUnwindSafe for LlmCostRecord
impl Send for LlmCostRecord
impl Sync for LlmCostRecord
impl Unpin for LlmCostRecord
impl UnsafeUnpin for LlmCostRecord
impl UnwindSafe for LlmCostRecord
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