Skip to main content

Module tokens

Module tokens 

Source
Expand description

Token estimation utilities

Re-exports from vtcode-commons for backward compatibility.

Functionsยง

estimate_tokens
Count the number of tokens in text using tiktoken BPE.
truncate_to_tokens
Truncate text to at most max_tokens tokens.