Mismatch between `createFile(file: File)` and `createReadStream` in docs
Problem
Describe the bug The typings were updated such that the signature is `createFile(file: File)`, but the docs example shows a `ReadStream` being provided. `File` is not available in Node. What is meant to be done here? Is this a typo, should be `File | ReadStream`? To Reproduce Try to pass a `ReadStream` to `createFile()`, see type error. Code snippets _No response_ OS N/A Node version latest Library version latest
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Mismatch between `createFile(file: File)` and `createReadStream` in docs
Appears to be caused by an upstream change in the tool we use to auto-generate this API client: https://github.com/OpenAPITools/openapi-generator/pull/12831 Still looking for a fix that we can publish in our package. As a short-term workaround, developers can cast to `any` when calling the createFile method: [code block]
Trust Score
4 verifications
- 1
Appears to be caused by an upstream change in the tool we use to auto-generate t
Appears to be caused by an upstream change in the tool we use to auto-generate this API client: https://github.com/OpenAPITools/openapi-generator/pull/12831
- 2
Still looking for a fix that we can publish in our package. As a short-term work
[code block]
Validation
Resolved in openai/openai-node GitHub issue #25. Community reactions: 5 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep