-
Notifications
You must be signed in to change notification settings - Fork 305
Search grounding is not working - Error: use google_search field instead of google_search_retrieval field #330
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
Comments
The issue is fixed, but no one has merged it: #318 |
this library is effectively abandoned - no commit merged since about 3 months ago? |
It seems so, but unfortunately. |
Bumping this. Having the exact same issue. |
Bump |
I could not make it work... |
Thanks for your feedback. Starting with Gemini 2.0 models, search grounding tool changed from Gemini 1.5 models can still use The team is working on updating the api document, thanks @Leask for contributing the samples, I will review your PR shortly. |
Thank you for the review. |
PR #318 has been merged |
I'm using tools: [{google_search: {},},] but the groundingMetadata is almost always empty. "the model can decide when to use Google Search". So enabling this tool, lets the model decide for itself if it needs to use google_search? I need to force it, my use case completely breaks if it doesn't use the grounding. Is there no way to force the grounding? |
Try to ask "tell me the latest movies on IMDB". You will see the result. |
I have in my prompt "SEARCH THE WEB, use google_search, use grounding. Return in json format information about "Iphone 16" etc etc". And it returns, without using grounding. "The upcoming iphone 16 is expected to feature blabla". How do i force it to use grounding when it's obviously needed? |
Added another PR to use |
Two months later, this issue still feels critical. I've built multiple services that heavily rely on search grounding, and I consistently struggle to get long prompts to trigger a search. We need a boolean option to force a search, similar to how dynamic_threshold worked before. Even better would be to provide the AI with exactly what to search for, for most cases i know exactly what would be the best search query - letting the ai come up with search queries isn't always the best option either. It feels like the API is developed to work autonomously like a chat client, we're developers, not grandmas, we can handle it |
Hi @Glutch do you have an example prompt to reproduce the issue? thanks |
Description of the bug:
I implemented the search grounding feature by following the sample code and it seems to be broken at the moment:
A temporary workaround is to replace
googleSearchRetrieval
with an emptygoogleSearch
:Simply replacing the field name would result in this error:
Actual vs expected behavior:
Expected behavior: the documentation, sample code, and type definition should be updated to use
googleSearch
field.Thank you.
The text was updated successfully, but these errors were encountered: