generative-ai icon indicating copy to clipboard operation
generative-ai copied to clipboard

[Feat]: please provide examples with tool use where an individual parameter is an object

Open kristoph opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

I am able to use tools with simple parameters ( strings, numbers, booleans ) but when I try to pass an object the model fails with the object parameters payload returning 'unknown' rather than a property.

Describe the solution you'd like

I am simply looking for an example in one of the tool notebooks that shows how to pass an object as a parameter which has multiple properties.

Describe alternatives you've considered

No response

Additional context

I am the author of this:

https://github.com/EndlessInternational/intelligence

It currently supports 10 different LLM vendors including Google. I have tools ( including objects and arrays ) working for Open AI and Anthropic but Gemini has me stumped on more complex tools.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

kristoph avatar Oct 27 '24 21:10 kristoph

@kristoph I think this is what you are looking for?

https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/function-calling/function_calling_data_structures.ipynb

@koverholt is the author.

holtskinner avatar Oct 31 '24 17:10 holtskinner

Thanks for the info. We've also been tracking this discussion here:

https://github.com/GoogleCloudPlatform/generative-ai/discussions/1342

And in this upstream issue that I filed.

https://issuetracker.google.com/issues/376170319

So we can keep an eye on that bug report in the issue tracker as the core issue behind this GitHub issue and related GitHub Discussion.

koverholt avatar Oct 31 '24 18:10 koverholt