Closed clstaudt closed 3 months ago
The AttributeError: 'Anthropic' object has no attribute 'beta'
suggests that the Anthropic
class is being accessed in a way that expects an attribute named beta
, which does not exist in the class definition.
The Anthropic
class in the llama_index.llms.anthropic
module defines the following attributes and methods, but beta
is not one of them [1][2]:
model
temperature
max_tokens
base_url
timeout
max_retries
additional_kwargs
_client
_aclient
__init__
class_name
metadata
tokenizer
_model_kwargs
_get_all_kwargs
_get_content_and_tool_calls
chat
complete
stream_chat
stream_complete
achat
acomplete
astream_chat
astream_complete
chat_with_tools
achat_with_tools
get_tool_calls_from_response
To resolve this issue, ensure that your code does not reference a non-existent attribute beta
. If you need further assistance, please provide more context or check if there are any custom modifications or extensions to the Anthropic
class in your environment.
To continue talking to Dosu, mention @dosu.
I have the same problem. My code can run correctly before yesterday and i didn't change my code, but now it have the same AttributeError: 'Anthropic' object has no attribute 'beta'
The dosu bot isn't even smart enough to recognize that it's not my code triggering the error.
@rinmy23 @clstaudt anthropic recently moved their tools api from beta to GA, and updated their latest client SDK
Downgrade the client SDK if you need it to work right now, but will have a new version published in 30 mins or so
@logan-markewich How to install the fix?
Downgrade the client SDK if you need it to work right now,
@logan-markewich What is the client SDK here? I am a bit confused about the many sub-packages and how they relate to the main llama_index package.
Bug Description
Version
0.10.43, 0.10.44
Steps to Reproduce
See code above
Relevant Logs/Tracbacks
No response