mirror of https://github.com/hwchase17/langchain
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)pull/642/head
parent
b374d481c8
commit
5c97f70bf1
Loading…
Reference in New Issue