Repositorium-ch / embedding-service

MIT License
2 stars 1 forks source link

Response should have field "embedding" per vector #6

Closed michaelwechner closed 5 months ago

michaelwechner commented 5 months ago

The response of http://localhost:3000/v1/embeddings is

{ "object": "list", "model": "Xenova/all-MiniLM-L6-v2", "data": [ [ 0.08858765661716461, 0.02421238273382187, 0.011026180349290371, 0.07446031272411346,

but this is not really compatible with OpenAI:

https://platform.openai.com/docs/guides/embeddings/what-are-embeddings

{ "object": "list", "data": [ { "object": "embedding", "index": 0, "embedding": [ -0.006929283495992422, -0.005336422007530928, ... (omitted for spacing) -4.547132266452536e-05, -0.024047505110502243 ], } ], "model": "text-embedding-3-small", "usage": { "prompt_tokens": 5, "total_tokens": 5 } }

colin-r-carter commented 5 months ago

Thanks @michaelwechner, should be fixed now with fa454e57881f19bda632f09530afcbaded2bec28

Just reopen the issue, if further adaptions are needed :)