-
Notifications
You must be signed in to change notification settings - Fork 163
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
Count Tokens for Bedrock #353
Comments
That's right; we're now deprecating token-counting in the client because the tokenization algorithms in Claude 3 are different (see deprecation notes on the count_tokens() method). The new recommendation is to look at usage in the return value. |
@rattrayalex will there be a way to calculate how much tokens a given text takes without making a chat completion call? |
Not at this time, unfortunately. You can continue to use |
Thanks for the suggestion. Would you recommend I.e.
|
@x5a might be better positioned to answer that. |
I am getting following when I am trying to calculate tokens in bedrock.
AttributeError: 'AnthropicBedrock' object has no attribute 'count_tokens'
It seems like there is no implementation for it.
Thanks.
The text was updated successfully, but these errors were encountered: