Closed eric8he closed 6 days ago
An alternative would be to change uploadAndPoll
to unpack files
and fileIds
from the JSON object and make them explicit params
Thanks for the report, I've shared this with the docs team. I'm going to close this as it isn't related to the SDK.
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
Note: This is not an issue with the library, but rather the official documentation on the OpenAI website.
Under Step 2 in [https://platform.openai.com/docs/assistants/tools/file-search](this doc), this block of code is shown:
In the last line, uploadAndPoll expects a JSON object of the format
{ files: Uploadable[]; fileIds?: string[] }
. However, in the given example, we directly pass infileStreams
, an object of typeUploadable[]
.The last line in the documentation should then be updated to
To Reproduce
Attempt to run the code segments provided in the documentation.
Code snippets
No response
OS
macOS
Node version
Node v22.11.0
Library version
openai v4.72.0