Skip to content

Instantly share code, notes, and snippets.

@benjreinhart
Created November 2, 2023 17:59
Show Gist options
  • Save benjreinhart/30cae75b046a82f16452ea6827e8b111 to your computer and use it in GitHub Desktop.
Save benjreinhart/30cae75b046a82f16452ea6827e8b111 to your computer and use it in GitHub Desktop.
Cohere embed v3 error

When I try to use cohere embed v3, e.g.:

curl --request POST \
     --url https://api.cohere.ai/v1/embed \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <<apiKey>>' \
     --header 'content-type: application/json' \
     --data '
{
  "texts": [
    "hello",
    "goodbye"
  ],
  "model": "embed-english-v3.0"
}
'

I get an HTTP 400 error with this JSON body:

{"message":"invalid request: valid input_type must be provided with the provided model"}

If I try the same request, but use embed-english-v2.0 for the model, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment