Skip to main content

request_cost_usd

Function request_cost_usd 

Source
pub fn request_cost_usd(
    model: &str,
    ttl: CacheTtl,
    read: u64,
    write: u64,
    input: u64,
    output: u64,
) -> f64
Expand description

Cost of one request: read cache reads, write cache writes at ttl’s write price, input uncached input, output output tokens.