Skip to content

What endpoint to use for embeddings? #1089

Answered by jamesbraza
jamesbraza asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, I figured this out:

> curl http://localhost:8080/embeddings -X POST -H "Content-Type: application/json" -d '{
    "input": "Your text string goes here",
    "model": "bert-embeddings"
  }' | jq "."
...
{
  "object": "list",
  "model": "bert-embeddings",
  "data": [
    {
      "embedding": [
        0.051830754,
        ...,
        -0.023937061
      ],
      "index": 0,
      "object": "embedding"
    }
  ],
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "total_tokens": 0
  }
}

What do you think of me adding this to the docs?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jamesbraza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
kind/documentation Improvements or additions to documentation kind/question Further information is requested
1 participant