Skip to main content

count_tokens

Function count_tokens 

Source
pub fn count_tokens(text: &str) -> usize
Expand description

Count tokens the way Claude does. Falls back to estimate_tokens on failure.