Skip to content

Commit cacf409

Browse files
authored
Fix documentation for 'model' parameter in CohereEmbeddings (#797)
Currently, the class parameter 'model_name' of the CohereEmbeddings class is not supported, but 'model' is. The class documentation is inconsistent with this, though, so I propose to either fix the documentation (this PR right now) or fix the parameter. It will create the following error: ``` ValidationError: 1 validation error for CohereEmbeddings model_name extra fields not permitted (type=value_error.extra) ```
1 parent 54f9e42 commit cacf409

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

langchain/embeddings/cohere.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CohereEmbeddings(BaseModel, Embeddings):
1818
.. code-block:: python
1919
2020
from langchain.embeddings import CohereEmbeddings
21-
cohere = CohereEmbeddings(model_name="medium", cohere_api_key="my-api-key")
21+
cohere = CohereEmbeddings(model="medium", cohere_api_key="my-api-key")
2222
"""
2323

2424
client: Any #: :meta private:

0 commit comments

Comments
 (0)