I use Multer memory storage to upload files to my app, and i need to upload the file to open ai const response = await openai.files.create({ file: bufferStream, purpose: 'assistants', });
and then use the file id for assistant api call.
I’ve used this `const bufferStream = new Readable();
bufferStream._read = () => {}; // No-op
bufferStream.push(file.buffer);
bufferStream.push(null);code to convert the buffer to stream. but i'm getting this
Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got () => { } instead`
any help on what kind of file is acceptable?