From cacf4091c0dda3e5a2fe22c58075c172a56bf9e8 Mon Sep 17 00:00:00 2001 From: Johanna Appel Date: Mon, 30 Jan 2023 23:55:08 +0100 Subject: [PATCH] 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) ``` --- langchain/embeddings/cohere.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/langchain/embeddings/cohere.py b/langchain/embeddings/cohere.py index 420ce369a..b55e4aaaf 100644 --- a/langchain/embeddings/cohere.py +++ b/langchain/embeddings/cohere.py @@ -18,7 +18,7 @@ class CohereEmbeddings(BaseModel, Embeddings): .. code-block:: python from langchain.embeddings import CohereEmbeddings - cohere = CohereEmbeddings(model_name="medium", cohere_api_key="my-api-key") + cohere = CohereEmbeddings(model="medium", cohere_api_key="my-api-key") """ client: Any #: :meta private: