Skip to main content

Module budget

Module budget 

Source
Expand description

Token budget tracking and allocation. Token budget management for context assembly.

Structs§

BudgetAllocation
Divides a total token budget across context zones.
TokenBudget
Tracks token usage against a maximum budget.
ZoneBudgetConfig
Configuration for zone budget percentages.

Functions§

estimate_tokens
Estimates token count for a text string. Uses word count * 1.3 as a rough approximation for English text.