meter_batch_results

Function meter_batch_results 

Source
pub fn meter_batch_results(
    jsonl: &str,
    pricing: &PricingTable,
    default_model: &str,
) -> BatchMeteringSummary
Expand description

Parse a batch result JSONL file and compute the total cost at the batch (50% discount) rate. Each line is parsed independently; a malformed line is counted as an error and skipped.

pricing is the gateway’s compiled pricing table. default_model is used when a response line does not include a model field.