openai / openai/openai-openapi
OpenAPI spec doesn't allow embedding response to be base64 encoded string
Open
Nobody has claimed this yet.
bug
specification
- Dominant language
- No language data
- Stars
- 2.5k
- Forks
- 527
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 2
Description
When I call the embeddings API with encoding_format=base64, the embedding field of the response item is a string.
curl -v https://api.openai.com/v1/embeddings \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "The food was delicious",
"model": "text-embedding-3-small",
"encoding_format": "base64",
"dimensions":10
}'
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": "nMcovm6gOb7ldwO/AESlvk0Avz2nZIq+3c+EvZvdFT9HsZa9oSy+vg==" <------ THIS
}
],
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 4,
"total_tokens": 4
}
}
However, the OpenAPI spec does not reflect that:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in openapi.yaml at the schema around lines 17047-17052 and compare it with the embeddings API example in the issue. Update the response schema so the embedding field reflects the base64 string form as well as the existing form, then verify the generated specification accepts the documented response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100