I am trying to construct model with following code to use grounding feature using Google Search
model = genai.GenerativeModel(
model_name="gemini-2.0-flash-exp",
generation_config=generation_config,
system_instruction="You do Stock Price Analysis on public Company based on latest public data inclusing news, stock market, leadership changes, product line ",
tools = [
genai.protos.Tool(
google_search = genai.protos.Tool.GoogleSearch(),
),
],
)
But I get
AttributeError: type object 'Tool' has no attribute 'GoogleSearch'
What is appropriate way to use grounding feature using Google Search in model ?
would appreciate help on this