Skip to main content

record

Function record 

Source
pub fn record(
    agent: &str,
    route: &str,
    model: &Model,
    tokens: &TokenCounts,
    actual: Option<f64>,
    now_ms: i64,
) -> f64
Expand description

Adds one response to the agent’s day on route and returns that response’s cost: the provider’s own charge when the response reported one (actual), else the price table’s estimate.