BAAI Embeddings POST Array 3001, 500 Errors

Hi there, really pumped about CFs embeddings service.

I have recently started testing out a CF worker to take in an array of text for my embeddings service. I am noticing with the recent updates a failure to process more than one embedding at a time. Where as before I was able to batch the embeddings until the job was finished.

Currently I am seeing 500 and then 3001 errors.

My hope would be to offer a batched solution of chunked text and send it in via my worker for embeddings processing to return my embeddings.

Are there limits on payloads? Processing? Runtime?

Just wondering what to expect so I can work that out in my pipeline.

Thanks guys!

1 Like

We’re getting the same error for embeddings API:

local-api-1           |  
local-api-1           | statusCode: 500 
local-api-1           | statusText: Internal Server Error 
local-api-1           | 
local-api-1           |  {
local-api-1           |   errors: [
local-api-1           |     { message: 'AiError: AiError: Unknown internal error', code: 3001 }
local-api-1           |   ],
local-api-1           |   success: false,
local-api-1           |   result: {},
local-api-1           |   messages: []
local-api-1           | }

A possible explanation is that the text is too large for the given word embeddings model.
See: Discord