Skip to main content

usage_chunk

Function usage_chunk 

Source
pub fn usage_chunk(
    id: &str,
    model: &str,
    created: u64,
    prompt_tokens: u32,
    completion_tokens: u32,
) -> StreamChunk
Expand description

The usage chunk (empty choices, real counts) sent just before the finish chunk, exactly as OpenAI’s stream_options.include_usage does.