Open mezozawahra opened 1 week ago
Thanks for the report, could you try again with the latest SDK version? We recently fixed a separate bug with file uploads so this might've been fixed as well
@RobertCraigie I tried the latest version (^4.58.1
), the memory consumption is reduced, instead of using 60mb
it used 44mb
, I tried POST request twice on ExpressJS twice ( uploadAndPoll twice ), so the webapp memory usage reached 390mb
and stayed on that level
update I tried it again , here's a before and after upload memory usage Before After
Thanks, we'll investigate.
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
I use S3 Bucket to getObject as stream and then upload it to a vector store using
vectorStores.fileBatches.uploadAndPoll
, the memory usage is supposed to increase during the upload process and return to its baseline after finishing but it doesn't, I uploaded a22mb
file and memory usage went from300mb
to360mb
and never returned to baseline Note - 1: the upload process is part of POST request in Express.js, and memory usage remained high even after returning the json response Note - 2 I tried saving the file to disk using "fs", it consumed memory and returned back to baseline, so I think the bug is in OpenAI SDKTo Reproduce
req.params.id
is the the file key saved in s3 bucketexport async function post(req:Request , res: Response, next: NextFunction){ try {
}
import { post } from "./controller/files" router.get("/:id", post)