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

Gemini 1.5 Pro results in 500 Internal error with as many tools as Flash #12

Closed
MrCsabaToth opened this issue Jul 16, 2024 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@MrCsabaToth
Copy link
Member

MrCsabaToth commented Jul 16, 2024

Even though I disabled some tools for gemini-1.5-flash (the Exchange Tool and either the Web Search (Duck Duck Go) or the Tavily Web research tool, and also the Alpha Vantage), but Flash was working with several tools.
It seems Pro cannot take as many, or we need to tune some function descriptions?
The 500 error happens during the model initialization.

@MrCsabaToth MrCsabaToth added the bug Something isn't working label Jul 16, 2024
@MrCsabaToth MrCsabaToth changed the title Gemini 1.5 Pro seems to poop it's pants and 500 Internal error with many tools Gemini 1.5 Pro results in 500 Internal error with as many tools as Flash Jul 16, 2024
@MrCsabaToth
Copy link
Member Author

MrCsabaToth commented Jul 20, 2024

For MVP sprint we can neglect this IMHO and roll with the Flash. We can figure it out after the hackathon deadline.

@MrCsabaToth
Copy link
Member Author

There's an idea to stuff the prompt with the list of the available tools and functions. Even though passing the available tools in a native way should give the information to the model, but maybe reinforcing that with a repeated own version would help. Joan Boronat Ruiz advised that and I'll try it https://medium.com/@tocsa2/i-dont-think-it-s-a-good-idea-to-repeat-the-tools-in-the-system-prompt-because-the-model-receives-e90a7df72859

@MrCsabaToth
Copy link
Member Author

I'm using the extra function stuffing. It didn't prevent some internal errors, however it seems to not interfere with the native tool list because I was able to make queries which require two rounds of function calls (weather prompt uses the location function first and then the weather function).

@MrCsabaToth MrCsabaToth removed their assignment Aug 17, 2024
@MrCsabaToth
Copy link
Member Author

Another related issue google-gemini/generative-ai-dart#194

@MrCsabaToth
Copy link
Member Author

We are now converting over to https://pub.dev/packages/firebase_vertexai (#53), let's see how that deals with functions. So far not good (Unable to submit request because function parameters schema should be of type OBJECT. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling), the functions worked with the other package already, we are a step back again.

@MrCsabaToth
Copy link
Member Author

Not 500, but after transition we are dealing with other issues, but not 500s

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

1 participant