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

Mark function.parameters as required #52

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

rattrayalex
Copy link
Contributor

In openai/openai-node#181 (comment), a user claimed that a function without parameters specified will not be called, but the same function with parameters: { 'type': 'object', properties: {} } is called. This leads me to believe that the user should always pass parameters, even if they must be an empty object.

A better approach to marking this required might be to make this the default on the server side, so that users do not need to pass this object for functions which accept no parameters. However, in case that'll take some time to get to, I wanted to put up this PR for now to improve the DX in the meantime.

In openai/openai-node#181 (comment), a user claimed that a function without `parameters` specified will not be called, but the same function with `parameters: { 'type': 'object', properties: {} }` is called. This leads me to believe that the user should always pass `parameters`, even if they must be an empty object.

A better approach to marking this required might be to make this the default on the server side, so that users do not need to pass this object for functions which accept no parameters.
@athyuttamre athyuttamre merged commit 8493692 into openai:master Jun 28, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants