openai-node
openai-node copied to clipboard
RunnerOptions is not exposed for runTools and runFunctions
Confirm this is a Node library issue and not an underlying OpenAI API issue
- [X] This is an issue with the Node library
Describe the bug
The maxChatCompletions option is very helpful in managing costs. However, it is not exposed through the interface due to a typing bug.
I think the fix is to simply change the Core.RequestOptions type to RunnerOptions which only contains maxCompletions at the moment.
To Reproduce
Try passing maxCompletions to the runTools/runFunctions options
Code snippets
No response
OS
macOS
Node version
v18.16.0
Library version
v4.24.0
Casting the options with maxCompletions to RequestOptions is a workaround.
{ maxChatCompletions: 1 } as RequestOptions
Thanks, we'll try to fix this soon!