yarricharY
Convex Community3y ago
9 replies
yarrichar

Storing openai embeddings "length limit exceeded"

I'm generating OpenAI embeddings in an action, and when I try and pass them to a mutation for saving I run into:
{"code":"BadJsonBody","message":"Failed to buffer the request body: length limit exceeded"}


I'm assuming my only option is to pass them to the mutation in batches? Hoping to avoid that, since it's not ideal from a transactional point of view.

In terms of the quantity I'm trying to pass to the mutation - it's just 100 vectors, and the original text which is approx 69k characters long.
Was this page helpful?