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

Handle functions with no parameters for Google AI #183

Merged
merged 8 commits into from
Sep 29, 2024

Conversation

elliotb
Copy link
Contributor

@elliotb elliotb commented Sep 27, 2024

If a function is defined with an empty parameter list, the API returns * GenerateContentRequest.tools[0].function_declarations[0].parameters.properties: should be non-empty for OBJECT type\n with the current implementation.

Removing the parameters key from the function declaration when there are no parameters resolves this.

Copy link
Owner

@brainlid brainlid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

❤️💛💙💜

@brainlid brainlid merged commit 29c1134 into brainlid:main Sep 29, 2024
1 check passed
@elliotb elliotb deleted the google-function-no-params branch September 30, 2024 14:49
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.

2 participants