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: Add support for cohere SDK v5 (keeps v4 backwards compatibility) #19084
community: Add support for cohere SDK v5 (keeps v4 backwards compatibility) #19084
Conversation
billytrend-cohere
commented
Mar 14, 2024
•
edited
edited
- Description: Add support for cohere SDK v5 (keeps v4 backwards compatibility)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -34,7 +36,7 @@ class CohereEmbeddings(BaseModel, Embeddings): | |||
|
|||
cohere_api_key: Optional[str] = None | |||
|
|||
max_retries: Optional[int] = 3 | |||
max_retries: int = 3 |
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.
Will technically break anyone explicitly passing max_retries=None
, which may be something people were using instead of max_retries=0
. If that wouldn't work before though, I like this as it's more explicit!
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.
Ah actually looks like old behavior would do something unpredictable because would "fall back on other params to urllib3.Retry" but there were no other params. This is a good change.
…ility) (langchain-ai#19084) - **Description:** Add support for cohere SDK v5 (keeps v4 backwards compatibility) --------- Co-authored-by: Erick Friis <erick@langchain.dev>
…ility) (langchain-ai#19084) - **Description:** Add support for cohere SDK v5 (keeps v4 backwards compatibility) --------- Co-authored-by: Erick Friis <erick@langchain.dev>
…ility) (langchain-ai#19084) - **Description:** Add support for cohere SDK v5 (keeps v4 backwards compatibility) --------- Co-authored-by: Erick Friis <erick@langchain.dev>
…ility) (#19084) - **Description:** Add support for cohere SDK v5 (keeps v4 backwards compatibility) --------- Co-authored-by: Erick Friis <erick@langchain.dev>