Skip to main content

Module tokenizer

Module tokenizer 

Source
Expand description

Pluggable token counting for context budget management.

Provides the TokenCounter trait for text-to-token-count conversion, with EstimateTokenCounter as a simple default.

Structs§

EstimateTokenCounter
Default token counter: estimates tokens as len / 4.

Traits§

TokenCounter
Trait for counting tokens in text.