estimate_tokens

Function estimate_tokens 

Source
pub fn estimate_tokens(text: &str) -> i32
Expand description

Estimate token count using the configured tokenizer if present.

Falls back to estimate_tokens_heuristic when no global tokenizer has been registered.