Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes being requested
Fixed missing
user_data
purpose type in theFileObject
interface to match the official OpenAI API specification.Changes:
'user_data'
to the union type definition for thepurpose
fielduser_data
in the supported values listAdditional context & links
According to the OpenAI Files API documentation,
user_data
is a valid purpose value that can be used when uploading files. However, this option was missing from the TypeScript interface definition, causing a mismatch between the actual API capabilities and the type definitions.The
user_data
purpose is commonly used for general file uploads (as seen in OpenAI's web dashboard) and is referenced in community discussions about file purposes, but was inadvertently omitted from this generated interface.Example