Skip to main content
Version: Next

PydanticAiUsageStats

A lightweight accumulator of token usage across extraction calls.

Index

Methods

add

  • add(usage): None
  • Accumulate the usage reported by a single run.


    Parameters

    • usage: RunUsage

    Returns None

Properties

input_tokens

input_tokens: int

output_tokens

output_tokens: int

requests

requests: int

total_tokens

total_tokens: int

The sum of input and output tokens.