When trying to upload a file to vector store in assistant api getting this error
Error in setting up resources: TypeError: Cannot read properties of undefined (reading 'length')
at FileBatches.uploadAndPoll (/home/user/projs/pet-mate-BE/functions/node_modules/openai/resources/beta/vector-stores/file-batches.js)// Create the Vector Store const vectorStore = await openai.beta.vectorStores.create({ name: "Pet Mate Store" }); // Upload files to the Vector Store const filePath = path.join(__dirname, 'productData.json'); console.log("🚀 ~ exports.setupAssistantResources=functions.https.onCall ~ filePath:", filePath) const fileStreams = fs.createReadStream(filePath); await openai.beta.vectorStores.fileBatches.uploadAndPoll(vectorStore.id, fileStreams); // Update the Assistant to use the Vector Store await openai.beta.assistants.update(assistant_id, { tool_resources: { file_search: { vector_store_ids: [vectorStore.id] } }, });