Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Tokens for a given string input #23

Open
VpkPrasanna opened this issue Sep 12, 2024 · 5 comments
Open

Get Tokens for a given string input #23

VpkPrasanna opened this issue Sep 12, 2024 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@VpkPrasanna
Copy link

i wanted to know is there any way how to see the tokens for an given string or any api from anthropic for a given string .
Like how other LLM has their own tokenizer to which return back the tokens .

@ncoop57
Copy link
Contributor

ncoop57 commented Dec 30, 2024

Not currently, but this would make an awesome PR if you'd be interested in adding it 🤓 @VpkPrasanna

@ncoop57 ncoop57 added enhancement New feature or request good first issue Good for newcomers labels Dec 30, 2024
@VpkPrasanna
Copy link
Author

would love to do it

Not currently, but this would make an awesome PR if you'd be interested in adding it 🤓 @VpkPrasanna

@VpkPrasanna
Copy link
Author

would love to do it

Not currently, but this would make an awesome PR if you'd be interested in adding it 🤓 @VpkPrasanna

need some help to do it, because till now i could not able to find any online implementation of the same . am telling this when i raised this issue

@ncoop57
Copy link
Contributor

ncoop57 commented Jan 14, 2025

Hey sorry for the late response @VpkPrasanna. You can see how to get the count of the tokens from this api page: https://docs.anthropic.com/en/docs/build-with-claude/token-counting

@VpkPrasanna
Copy link
Author

Hey sorry for the late response @VpkPrasanna. You can see how to get the count of the tokens from this api page: https://docs.anthropic.com/en/docs/build-with-claude/token-counting

Actually i am aware of this but the issue raised is how to get the tokens back for a given string ?
like how tiktoken is there to get the tokens and other things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants