-
-
Notifications
You must be signed in to change notification settings - Fork 690
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
Bad keyword error #1253
Comments
Also seeing this, after trying to setup Instructor + Anthropic from the docs. Is this a dependency issue? |
Appears to be an issue with the Anthropic SDK, since simply creating an instance of the Anthropic() client triggers the same error. It's been fixed in the latest version of the Anthropic SDK (v0.40). anthropics/anthropic-sdk-python#779 The latest release of Instructor (v1.7) constrains the Anthropic SDK to versions ">=0.36.2,<0.38.0". On master 0.40 is already permitted. The error arises from httpx. Fastest workaround is to downgrade httpx, as suggested in a comment below the anthropic issue. |
Happy to close this issue as resolved, but thought it could also be helpful for other users looking for answers on the same topic. Any preference? |
Have a tentative PR here that will bump anthropic up to 0.42.0 and make it the default version for people moving forward. This also allows us to support prompt caching in the normal standard message.create. Will start working on documentation for computer use in the beta #1281 |
Ok I've just published instructor 1.7.2 which bumps anthropic to v0.42.0 and avoids this issue with https |
What Model are you using?
Describe the bug
Apologies, I haven't had a ton of time to investigate, but I wanted to open a ticket before I forgot. This might actually be an error from a third party package. I was following this guide https://python.useinstructor.com/integrations/anthropic/ and when running
an error is raised for a bad keyword
proxies
forClient.__init__()
and is unable to create theclient
object.To Reproduce
Follow the guide
Expected behavior
Client created without error.
Patch
I was able to sidestep the issue by commenting L860 in
_base_client.py
but it's not obvious to me if that would cause downstream issues. After commenting this line, I was able to create theclient
object successfully and was able to send a query, however there were other issues but I have not ruled out external factors (my structured outputs) as the cause for those, as I ran out of time.uv pip install "instructor[anthropic]"
command in dedicated projectvenv
Sorry for the rushed post. Hackathon followed by cross country travel.
The text was updated successfully, but these errors were encountered: