Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CohereError: embed is not an available endpoint on this model #637

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

mmz-001
Copy link
Contributor

@mmz-001 mmz-001 commented Jan 18, 2023

Running the Cohere embeddings example from the docs:

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:

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)

From Cohere docs:
Currently available models are small and large (default)
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@hwchase17 hwchase17 merged commit 5c97f70 into langchain-ai:master Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants