-
Notifications
You must be signed in to change notification settings - Fork 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
feat: Add CohereTextEmbedder
CohereDocumentEmbedder
#5831
Conversation
893fb61
to
ca47506
Compare
CohereTextEmbedder
CohereTextEmbedder
CohereDocumentEmbedder
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.
Apologies for the latency here!
I took a first pass and left a couple of comments, but I have a general question: why the two embedders look so different? Say, one uses the async client and the other doesn't... Any additional info that can help me better understanding the code much appreciated!
haystack/preview/components/embedders/cohere_document_embedder.py
Outdated
Show resolved
Hide resolved
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.
Thank you for the detailed docstrings! Left a couple of suggestions to clean them up.
haystack/preview/components/embedders/cohere_document_embedder.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Daria Fokina <[email protected]>
Co-authored-by: Daria Fokina <[email protected]>
haystack/preview/components/embedders/cohere_document_embedder.py
Outdated
Show resolved
Hide resolved
haystack/preview/components/embedders/cohere_document_embedder.py
Outdated
Show resolved
Hide resolved
Superseded by deepset-ai/haystack-core-integrations#80 |
deepset-ai/haystack-core-integrations#80 is ready for review, closing this one |
Related Issues
Proposed Changes:
Add
CohereTextEmbedder
, a component that uses Cohere embedding models to embed strings into vectors.Add
CohereDocumentEmbedder
, a component that embeds a list of Documents.cohere
sdk instead of the post requests based implementation in V1.cohere
sdk (library).How did you test it?
Added unit tests.
Notes for the reviewer
"cohere"
needs to be added as a dependency in the haystack-preview-package.Supported Cohere Embedding Models and their embedding dimensions:
Cohere Embedding Models supported in 1.0 API that don't work anymore:
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.