-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
community: Expose Anthropic Retry Logic #17069
community: Expose Anthropic Retry Logic #17069
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@@ -92,11 +95,13 @@ def validate_environment(cls, values: Dict) -> Dict: | |||
base_url=values["anthropic_api_url"], | |||
api_key=values["anthropic_api_key"].get_secret_value(), | |||
timeout=values["default_request_timeout"], | |||
max_retries=values["max_retries"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
believe anthropic.Anthropic() doesn't accept None for max_retries, should we give it same default as they do (2)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, looks None isn't valid here. Updated to match their implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think @baskaryan ?
@baskaryan could you run those workflows one more time? 🙏 |
Merged from |
**Description:** Expose Anthropic's retry logic, so that `max_retries` can be configured via langchain. Anthropic's retry logic is implemented in their Python SDK here: https://github.com/anthropics/anthropic-sdk-python?tab=readme-ov-file#retries --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
**Description:** Expose Anthropic's retry logic, so that `max_retries` can be configured via langchain. Anthropic's retry logic is implemented in their Python SDK here: https://github.com/anthropics/anthropic-sdk-python?tab=readme-ov-file#retries --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
Description:
Expose Anthropic's retry logic, so that
max_retries
can be configured via langchain. Anthropic's retry logic is implemented in their Python SDK here: https://github.com/anthropics/anthropic-sdk-python?tab=readme-ov-file#retries