feat: update Cohere embedding model to use langchain_cohere, added support to dynamically load latest embedding models, improved error handling #6034
+47
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the
CohereEmbeddingsComponent
class in thesrc/backend/base/langflow/components/embeddings/cohere.py
file, as well as a minor update to thepyproject.toml
file. The changes focus on improving the functionality and robustness of theCohereEmbeddingsComponent
class.Improvements to
CohereEmbeddingsComponent
class:Any
fromtyping
andcohere
library.SecretStrInput
andDropdownInput
fields to include real-time refresh, refresh button, and combobox options. [1] [2]build_embeddings
method to include error handling and status updates.get_model
method to fetch available models from the Cohere API.update_build_config
method to dynamically update the build configuration based on field values.Minor update to
pyproject.toml
:closes: #5943