LLMTokenUsage

Type Alias LLMTokenUsage 

Source
pub type LLMTokenUsage = TokenUsage;

Aliased Type§

pub struct LLMTokenUsage {
    pub prompt_tokens: u32,
    pub completion_tokens: u32,
    pub total_tokens: u32,
}

Fields§

§prompt_tokens: u32

Number of tokens in the prompt/input.

Includes system messages, conversation history, and the current query.

§completion_tokens: u32

Number of tokens in the completion/output.

The generated response from the model.

§total_tokens: u32

Total tokens used (prompt + completion).

Should equal prompt_tokens + completion_tokens.