Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
π
π
π
Powered by
Hall
Inactive
Updated last month
0
Follow
Attributeerror: 'anthropic' object has no attribute 'get_tokenizer'
Attributeerror: 'anthropic' object has no attribute 'get_tokenizer'
Inactive
0
Follow
d
drewskidang
last month
Β·
@Logan M also AttributeError: 'Anthropic' object has no attribute 'get_tokenizer'
do we have fix for this or do we not use tokziner for anthropic anymore
L
d
17 comments
Share
Open in Discord
L
Logan M
last month
this method was never implemented π Anthropic doesn't provide a tokenizer afaik
d
drewskidang
last month
LOL why does the example say to use it
L
Logan M
last month
which example?
d
drewskidang
last month
https://docs.llamaindex.ai/en/stable/examples/llm/anthropic/
d
drewskidang
last month
@Logan M
L
Logan M
last month
oh spooky
L
Logan M
last month
that actually works for me
L
Logan M
last month
what version of
anthropic
do you have? I have
v0.36.0
d
drewskidang
last month
0.39.0
d
drewskidang
last month
do i need to downgrade lol worried about compatible issue with latest claude model
L
Logan M
last month
Hmm i guess anthropic removed or renamed that method? Will try updating and see where it went
For now if you need the tokenizer, just downgrade, should be fine
L
Logan M
last month
Looks like its removed
L
Logan M
edited last month
https://github.com/anthropics/anthropic-sdk-python/blob/dc261863c9ad7d1476bbf208c4f4b531247480de/CHANGELOG.md?plain=1#L9
d
drewskidang
last month
they closed they tokens too
L
Logan M
last month
The new API is pretty nice though if you use it directly. Allows for counting tools, images, etc.
The API in llama-index is limited to string in, int out though. Updating the class in any case right now
Attachment
d
drewskidang
last month
ooo thanks
L
Logan M
edited last month
https://github.com/run-llama/llama_index/pull/16909
Add a reply
Sign up and join the conversation on Discord
Join on Discord