Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RunnerOptions is not exposed for runTools and runFunctions #593

Open
1 task done
tday opened this issue Dec 20, 2023 · 2 comments
Open
1 task done

RunnerOptions is not exposed for runTools and runFunctions #593

tday opened this issue Dec 20, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@tday
Copy link

tday commented Dec 20, 2023

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

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

Screenshot 2023-12-20 at 4 10 47 PM
Screenshot 2023-12-20 at 4 10 53 PM

Code snippets

No response

OS

macOS

Node version

v18.16.0

Library version

v4.24.0

@tday tday added the bug Something isn't working label Dec 20, 2023
@tday
Copy link
Author

tday commented Dec 20, 2023

Casting the options with maxCompletions to RequestOptions is a workaround.

{ maxChatCompletions: 1 } as RequestOptions

@rattrayalex
Copy link
Collaborator

Thanks, we'll try to fix this soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants