Unable to get grounding (tools) part working in model construct

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

Hi @rp346, Welcome to the forum!!!

There is some issue with this code snippet, this is already escalated with the team. For the time being please try to follow this doc.