-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Confirm this is a Node library issue and not an underlying OpenAI API issue
- This is an issue with the Node library
Describe the bug
From the Assistants File Search tool docs it seems to upload a batch of files, you are suppose to use:
await openai.beta.vectorStores.fileBatches.uploadAndPoll(vectorStore.id, fileStreams)
This yields Error: No
filesprovided to process. If you've already uploaded files you should use
.createAndPoll() instead
Based on the code here it looks like you need to invoke the uploadAndPoll
method as follows:
await openai.beta.vectorStores.fileBatches.uploadAndPoll(vectorStore.id, {files: fileStreams})
The above yields a successful result. Leaving this here in case someone else finds themselves running into this. I did not look that hard but didn't see an open source docs repo/section I could PR against so perhaps someone on the Node SDK team can quickly update the docs.
To Reproduce
Run await openai.beta.vectorStores.fileBatches.uploadAndPoll(vectorStore.id, fileStreams)
Code snippets
OS
macOS
Node version
Node v20.18.0
Library version
openai v4.85.1