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 updated to 4.85.0 and noticed that the imports changed to "openai/resources/chat/completions/completions", so I went ahead and changed my imports in my project, but then new errors started surfacing with Types.
1st issue:
openai.beta.chat.completions.runTools()
previously returned a ChatCompletionStreamingRunner when my body is ChatCompletionStreamingToolRunnerParams. Now the inferred return Type returned is ChatCompletionRunner and my build pipeline is failing.
2nd issue:
AbstractChatCompletionRunner this._createChatCompletion()
previously returned a ChatCompletion, but now the inferred return type is a ParsedChatCompletion and my build pipeline is failing.
Reverting back to 4.84.0 works, so something broke with the latest 4.85.0 released today.
Thank you
To Reproduce
- Install [email protected]
- The first issue mentioned
let runner: ChatCompletionStreamingRunner;
runner = openAI.beta.chat.completions.runTools(
body,
{ signal: signal }
);
- The second issue mentioned, it's inside the AbstractChatCompletionRunner _runTools(). I have my own custom class extending from AbstractChatCompletionRunner but if I revert my changes and just copy and paste the code from AbstractChatCompletionRunner.ts then I see the error.
These issues do not happen with 4.84.0
Code snippets
OS
Windows
Node version
Node v20.12.2
Library version
openai 4.85.0