Add a tokenizing visualizer utility #1561
shhlife
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
Very cool! Griptape's Tokenizers don't have a Going to move this to show-and-tell so others can see what you've built. |
Beta Was this translation helpful? Give feedback.
0 replies
-
ah, so it would only work for certain tokenizers, like openAi? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's very helpful to get an understanding of how text is tokenized. A visualizer would be super useful.
We have a method on the
OpenAiTokenizer
that can count tokens, but nothing that visualizes how they look to the user.Here's a script that can do that:
To use it, you can do something like:
The result looks something like:
Beta Was this translation helpful? Give feedback.
All reactions