You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### ⚠ BREAKING CHANGES
* **client:** remove legacy `client.count_tokens()` & `client.get_tokenizer()` methods ([#726](https://github.com/anthropics/anthropic-sdk-python/issues/726))
* This functionality has been replaced by the `client.beta.messages.count_tokens()` API which supports newer models and all content functionality, such as images and PDFs.
The temporary workaround is to limit anthropic to versions before 0.39.0. The long term change is to limit anthropic to after 0.39.0 and switch AnthropicTokenizer to use client.beta.messages.count_tokens().
The text was updated successfully, but these errors were encountered:
yifanmai
changed the title
Switch AnthropicTokenizer to use
Switch AnthropicTokenizer to use client.beta.messages.count_tokens()
Dec 17, 2024
When
anthropic
is upgraded to 0.39.0 or newer, the following error happens:This is because of this breaking change:
The temporary workaround is to limit
anthropic
to versions before 0.39.0. The long term change is to limitanthropic
to after 0.39.0 and switchAnthropicTokenizer
to useclient.beta.messages.count_tokens()
.The text was updated successfully, but these errors were encountered: