Open
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
I'm trying to use the openai.beta.chat.completions.parse() function as shown in the official OpenAI SDK documentation, but I'm getting a TypeScript error:
Property 'chat' does not exist on type 'Beta'.
Expected behavior:
The code should run without TypeScript errors, as the documentation suggests openai.beta.chat.completions.parse exists.
Environment:
Package: openai
Version: 5.3.0 (or latest at time of writing)
Notes:
It looks like the SDK version does not include chat under the beta namespace, although the documentation shows it. Either the documentation is ahead of the SDK release, or the type declarations are incomplete.
Thanks!
To Reproduce
yarn add openai
const chain = await openai.beta.chat.completions.parse({})
Code snippets
OS
macOS
Node version
v20.10.0
Library version
5.3.0