ContextWindow.count_tokens()
Count tokens in text using the configured counter.
Usage
ContextWindow.count_tokens(text)Parameters
text: str- The text to count tokens for.
Returns
int- Token count.
Count tokens in text using the configured counter.
Usage
text: str int