Skip to content

Assistants File Search Documentation Incorrect - Yields #1337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
evanmrose opened this issue Feb 18, 2025 · 0 comments
Open
1 task done

Assistants File Search Documentation Incorrect - Yields #1337

evanmrose opened this issue Feb 18, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@evanmrose
Copy link

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

@evanmrose evanmrose added the bug Something isn't working label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant