It's a tool for piping in text and either counting the tokens or truncating them. Using `tiktoken` - documented here: https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb Idea from: - https://github.com/simonw/strip-tags/issues/2
It's a tool for piping in text and either counting the tokens or truncating them.
Using
tiktoken- documented here: https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynbIdea from: