-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
Incompatibility with latest Anthropic Client #6883
Comments
Answer generated by a 🤖 AnswerThe error message indicates that the To fix this issue, you need to replace Replace this code: values["client"] = anthropic.Client(
api_url=anthropic_api_url,
api_key=anthropic_api_key,
default_request_timeout=values["default_request_timeout"],
) With this: values["client"] = anthropic.Client(
base_url=anthropic_api_url,
api_key=anthropic_api_key,
default_request_timeout=values["default_request_timeout"],
) This change should resolve the issue and make LangChain compatible with the latest version of the Anthropic client. SourcesThis response is meant to be useful, save you time, and share context. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. |
For those just needing a quick work-around. |
@jmkuebler Do you happen to know if this was addressed in another issue/commit to the |
@adityamookerjee No I am not aware of another issue that could be linked. |
Hi, @rasharab! I'm Dosu, and I'm helping the LangChain team manage our backlog. I wanted to let you know that we are marking this issue as stale. From what I understand, the latest version of the Anthropic client is incompatible with the langchain Anthropic LLM utilities due to a change in the client's API. The Now, we would like to know if this issue is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days. Thank you for your understanding and cooperation. Let us know if you have any further questions or concerns! Best regards, |
System Info
Massive client changes as of this pr:
anthropics/anthropic-sdk-python@8d1d6af
Installing the latest anthropic client will cause langchain Anthropic LLM utiltiies to fail.
Looks like api_url no longer exists (they've moved to base_url).
Who can help?
@hwchase17
Information
Related Components
Reproduction
Expected behavior
Should work with latest release of Anthropic client.
The text was updated successfully, but these errors were encountered: