Skip to main content

usage_event

Function usage_event 

Source
pub fn usage_event(
    session_id: &str,
    run_id: &str,
    iteration: u32,
    gateway: &str,
    model: &str,
    estimated_input_tokens: usize,
    messages_count: usize,
    compacted: bool,
    usage: Option<&Usage>,
) -> Value
Expand description

Build the JSONL event for one model call. usage is the normalized usage (if the provider reported it); pass None when missing.