mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-19 21:33:51 +00:00
changed cohere.py to update the default model of embedding (#4709)
# The cohere embedding model do not use large, small. It is deprecated. Changed the modules default model Fixes #4694 Co-authored-by: rajib76 <rajib76@yahoo.com> Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
This commit is contained in:
parent
75fe9d3555
commit
e28f4a5f39
@ -18,11 +18,13 @@ class CohereEmbeddings(BaseModel, Embeddings):
|
|||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
from langchain.embeddings import CohereEmbeddings
|
from langchain.embeddings import CohereEmbeddings
|
||||||
cohere = CohereEmbeddings(model="medium", cohere_api_key="my-api-key")
|
cohere = CohereEmbeddings(
|
||||||
|
model="embed-english-light-v2.0", cohere_api_key="my-api-key"
|
||||||
|
)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
client: Any #: :meta private:
|
client: Any #: :meta private:
|
||||||
model: str = "large"
|
model: str = "embed-english-v2.0"
|
||||||
"""Model name to use."""
|
"""Model name to use."""
|
||||||
|
|
||||||
truncate: Optional[str] = None
|
truncate: Optional[str] = None
|
||||||
|
Loading…
Reference in New Issue
Block a user