You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an insertMany call with $vectorize fails, the status.documentResponses field may be completely absent.
For example, given the following call:
constinsertManyResult=awaitcollection.insertMany([{name: 'Alice',age: 30,$vectorize: 'Alice likes big red cars', key },{name: 'Bob',age: 40,$vectorize: 'Cause maybe, you\'re gonna be the one that saves me... and after all, you\'re my wonderwall...', key },{name: 'Charlie',age: 50,$vectorize: 'The water bottle was small', key },]);
the following response was returned:
{errors: [{message: 'The timeout period of 5000ms has been exceeded while executing POST /embeddings for server null',errorCode: 'SERVER_UNHANDLED_ERROR',}],}
This breaks the supposed invariant of status.documentResponses always being present, and forces users to awkwardly deal with two completely different error types for this one single command.
While this behavior may be acceptable for something like a malformed request, where the user may have made the screw-up, this is very unintuitive for just typical $vectorize calls—especially when you're using the clients and would (likely) never see any "Bad Request" errors or anything of the like.
The text was updated successfully, but these errors were encountered:
When an
insertMany
call with$vectorize
fails, thestatus.documentResponses
field may be completely absent.For example, given the following call:
the following response was returned:
This breaks the supposed invariant of
status.documentResponses
always being present, and forces users to awkwardly deal with two completely different error types for this one single command.While this behavior may be acceptable for something like a malformed request, where the user may have made the screw-up, this is very unintuitive for just typical
$vectorize
calls—especially when you're using the clients and would (likely) never see any "Bad Request" errors or anything of the like.The text was updated successfully, but these errors were encountered: