pub struct LlmInfo {
pub provider: Option<String>,
pub model_used: Option<String>,
pub tokens_input: Option<u64>,
pub tokens_output: Option<u64>,
pub timed_out: Option<bool>,
pub timeout_seconds: Option<u64>,
pub budget_exhausted: Option<bool>,
}Expand description
LLM metadata for receipts (wires ClaudeResponse fields into receipts)
Fields§
§provider: Option<String>§model_used: Option<String>§tokens_input: Option<u64>§tokens_output: Option<u64>§timed_out: Option<bool>§timeout_seconds: Option<u64>§budget_exhausted: Option<bool>Implementations§
Source§impl LlmInfo
impl LlmInfo
Sourcepub fn for_budget_exhaustion() -> Self
pub fn for_budget_exhaustion() -> Self
Create an LlmInfo for budget exhaustion errors
This is used when an LLM invocation fails due to budget exhaustion, allowing us to record the budget_exhausted flag in the receipt even though there’s no successful LlmResult.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LlmInfo
impl<'de> Deserialize<'de> for LlmInfo
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
impl StructuralPartialEq for LlmInfo
Auto Trait Implementations§
impl Freeze for LlmInfo
impl RefUnwindSafe for LlmInfo
impl Send for LlmInfo
impl Sync for LlmInfo
impl Unpin for LlmInfo
impl UnsafeUnpin for LlmInfo
impl UnwindSafe for LlmInfo
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