You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/langchain/embeddings
Sasmitha Manathunga 5c97f70bf1
Fix CohereError: embed is not an available endpoint on this model (#637)
Running the Cohere embeddings example from the docs:

```python
from langchain.embeddings import CohereEmbeddings
embeddings = CohereEmbeddings(cohere_api_key= cohere_api_key)

text = "This is a test document."
query_result = embeddings.embed_query(text)
doc_result = embeddings.embed_documents([text])
```

I get the error:

```bash
CohereError(message=res['message'], http_status=response.status_code, headers=response.headers)      
cohere.error.CohereError: embed is not an available endpoint on this model
```

This is because the `model` string is set to `medium` which is not
currently available.

From the Cohere docs:

> Currently available models are small and large (default)
1 year ago
..
hyde (WIP) add HyDE (#393) 1 year ago
__init__.py (WIP) add HyDE (#393) 1 year ago
base.py FAISS and embedding support (#48) 2 years ago
cohere.py Fix CohereError: embed is not an available endpoint on this model (#637) 1 year ago
huggingface.py Add HuggingFace Hub Embeddings (#125) 2 years ago
huggingface_hub.py Add HuggingFace Hub Embeddings (#125) 2 years ago
openai.py improve openai embeddings (#351) 2 years ago