Skip to content
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

Merged
merged 6 commits into from Mar 14, 2024

Conversation

billytrend-cohere
Copy link
Contributor

@billytrend-cohere billytrend-cohere commented Mar 14, 2024

  • Description: Add support for cohere SDK v5 (keeps v4 backwards compatibility)

Copy link

vercel bot commented Mar 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 14, 2024 10:42pm

@billytrend-cohere billytrend-cohere changed the title Add support for v5 (with v4 backwards compatibility) community: Add support for cohere SDK v5 (keeps v4 backwards compatibility) Mar 14, 2024
@billytrend-cohere billytrend-cohere marked this pull request as ready for review March 14, 2024 17:58
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Ɑ: models Related to LLMs or chat model modules 🔌: cohere Primarily related to Cohere integrations 🤖:improvement Medium size change to existing code to handle new use-cases labels Mar 14, 2024
@efriis efriis self-assigned this Mar 14, 2024
@@ -34,7 +36,7 @@ class CohereEmbeddings(BaseModel, Embeddings):

cohere_api_key: Optional[str] = None

max_retries: Optional[int] = 3
max_retries: int = 3
Copy link
Member

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!

Copy link
Member

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.

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Mar 14, 2024
@efriis efriis merged commit 7253b81 into langchain-ai:master Mar 14, 2024
61 checks passed
billytrend-cohere added a commit to billytrend-cohere/langchain that referenced this pull request Mar 20, 2024
rahul-trip pushed a commit to daxa-ai/langchain that referenced this pull request Mar 27, 2024
…ility) (langchain-ai#19084)

- **Description:** Add support for cohere SDK v5 (keeps v4 backwards
compatibility)

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
bechbd pushed a commit to bechbd/langchain that referenced this pull request Mar 29, 2024
…ility) (langchain-ai#19084)

- **Description:** Add support for cohere SDK v5 (keeps v4 backwards
compatibility)

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
gkorland pushed a commit to FalkorDB/langchain that referenced this pull request Mar 30, 2024
…ility) (langchain-ai#19084)

- **Description:** Add support for cohere SDK v5 (keeps v4 backwards
compatibility)

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
hinthornw pushed a commit that referenced this pull request Apr 26, 2024
…ility) (#19084)

- **Description:** Add support for cohere SDK v5 (keeps v4 backwards
compatibility)

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔌: cohere Primarily related to Cohere integrations 🤖:improvement Medium size change to existing code to handle new use-cases lgtm PR looks good. Use to confirm that a PR is ready for merging. Ɑ: models Related to LLMs or chat model modules size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants