class_docstr: The `genai.GenerativeModel` class wraps default parameters for calls to
  `GenerativeModel.generate_message`, `GenerativeModel.count_tokens`, and
  `GenerativeModel.start_chat`.
  
  This family of functionality is designed to support multi-turn conversations, and multimodal
  requests. What media-types are supported for input and output is model-dependant.
  
  >>> import google.generativeai as genai
  >>> import PIL.Image
  >>> genai.configure(api_key='YOUR_API_KEY')
  >>> model = genai.GenerativeModel('models/gemini-pro')
  >>> result = model.generate_content('Tell me a story about a magic backpack')
  >>> result.text
  "In the quaint little town of Lakeside, there lived a young girl named Lily..."
  
  Multimodal input:
  
  >>> model = genai.GenerativeModel('models/gemini-pro')
  >>> result = model.generate_content([
  ...     "Give me a recipe for these:", PIL.Image.open('scones.jpeg')])
  >>> result.text
  "**Blueberry Scones** ..."
  
  Multi-turn conversation:
  
  >>> chat = model.start_chat()
  >>> response = chat.send_message("Hi, I have some questions for you.")
  >>> response.text
  "Sure, I'll do my best to answer your questions..."
  
  To list the compatible model names use:
  
  >>> for m in genai.list_models():
  ...     if 'generateContent' in m.supported_generation_methods:
  ...         print(m.name)
  
  Arguments:
       model_name: The name of the model to query. To list compatible models use
       safety_settings: Sets the default safety filters. This controls which content is blocked
           by the api before being returned.
       generation_config: A `genai.GenerationConfig` setting the default generation parameters to
           use.
class_docstr_tok: ["The","`","genai.GenerativeModel","`","class","wraps","default","parameters","for","calls","to","`","GenerativeModel.generate_message","`",",","`","GenerativeModel.count_tokens","`",",","and","`","GenerativeModel.start_chat","`",".","This","family","of","functionality","is","designed","to","support","multi-turn","conversations",",","and","multimodal","requests",".","What","media-types","are","supported","for","input","and","output","is","model-dependant",".",">",">",">","import","google.generativeai","as","genai",">",">",">","import","PIL.Image",">",">",">","genai.configure","(","api_key='YOUR_API_KEY","'",")",">",">",">","model","=","genai.GenerativeModel","(","'models\/gemini-pro","'",")",">",">",">","result","=","model.generate_content","(","'Tell","me","a","story","about","a","magic","backpack","'",")",">",">",">","result.text","''","In","the","quaint","little","town","of","Lakeside",",","there","lived","a","young","girl","named","Lily","...","''","Multimodal","input",":",">",">",">","model","=","genai.GenerativeModel","(","'models\/gemini-pro","'",")",">",">",">","result","=","model.generate_content","(","[","...","``","Give","me","a","recipe","for","these",":","''",",","PIL.Image.open","(","'scones.jpeg","'",")","]",")",">",">",">","result.text","''","*","*","Blueberry","Scones","*","*","...","''","Multi-turn","conversation",":",">",">",">","chat","=","model.start_chat","(",")",">",">",">","response","=","chat.send_message","(","``","Hi",",","I","have","some","questions","for","you",".","''",")",">",">",">","response.text","''","Sure",",","I","'ll","do","my","best","to","answer","your","questions","...","''","To","list","the","compatible","model","names","use",":",">",">",">","for","m","in","genai.list_models","(",")",":","...","if","'generateContent","'","in","m.supported_generation_methods",":","...","print","(","m.name",")","Arguments",":","model_name",":","The","name","of","the","model","to","query",".","To","list","compatible","models","use","safety_settings",":","Sets","the","default","safety","filters",".","This","controls","which","content","is","blocked","by","the","api","before","being","returned",".","generation_config",":","A","`","genai.GenerationConfig","`","setting","the","default","generation","parameters","to","use","."]
code: def __init__(
      self,
      model_name: str = "gemini-m",
      safety_settings: safety_types.SafetySettingOptions | None = None,
      generation_config: generation_types.GenerationConfigType
      | None = None,
      tools: content_types.ToolsType = None,
  ):
      if "/" not in model_name:
          model_name = "models/" + model_name
      self._model_name = model_name
      self._safety_settings = safety_types.to_easy_safety_dict(
          safety_settings, harm_category_set="new"
      )
      self._generation_config = (
          generation_types.to_generation_config_dict(generation_config)
      )
      self._tools = content_types.to_tools(tools)
  
      self._client = None
      self._async_client = None
  
imports: from __future__ import annotations
  from collections.abc import Iterable
  import dataclasses
  import textwrap
  from typing import Union
  from google.ai import generativelanguage
  from google.generativeai import client
  from google.generativeai import string_utils
  from google.generativeai.types import content_types
  from google.generativeai.types import generation_types
  from google.generativeai.types import safety_types
label_desc: Use image node_id 1 to create a new GenerativeModel object  with example: obj = GenerativeModel(model_name, safety_settings, generation_config, tools)