Hey guys,
I’m trying to set up “gemini-2.0-flash-exp” model with using Grounding (GoogleSearch tool) via API iny my Python code.
However it always gives me errors (like: type object ‘Tool’ has no attribute 'GoogleSearch).
The only time when it gives me something else is when I use GoogleSearchRetrieval (as used in Gemini 1.5 Pro). Then it will give me “400 Unable to submit request because Please use google_search field instead of google_search_retrieval field… Learn more: Gemini API を使用してコンテンツを生成する | Generative AI on Vertex AI | Google Cloud”
The only way I can run Gemini 2.0 Flash with Grounding is via AI Studio. However the code you get from “Get code” just simply doesn’t work. Same case is with the code you get with “Open in Colab”.
Any tips?
Are you guys able to run 2.0 with Grounding in your code?
Thanks!