Expand description
obol-core: parse agent transcripts and estimate token cost.
Re-exports§
pub use error::ObolError;pub use model::Approximation;pub use model::CostEstimate;pub use model::MessageUsage;pub use model::ModelCost;pub use model::Provider;pub use model::TokenBuckets;pub use transcript::Dialect;
Modules§
- cost
- Price a Vec
against a PriceStore into a CostEstimate. - error
- model
- Public result types + the internal per-message usage record.
- pricing
- Price tables and the per-message cost kernel.
- transcript
Structs§
- Refresh
Report - Report from a pricing refresh.
Enums§
- Source
- Where to read the transcript bytes from. The dialect hint is a separate
argument to
estimate_cost, so it applies equally to a path or to bytes.
Functions§
- estimate_
cost - Estimate the cost of a transcript.
dialectis an optional hint; whenNone, the dialect is detected from the content. Loads the active price snapshot from disk (errors withPricingTablesMissingif absent). - refresh_
pricing_ tables - Fetch the LiteLLM sheet and write it as the active snapshot.
as_ofis the caller’s date string (the library has no clock).