generative-ai-python

google.generativeai.get_model

Calls the API to fetch a model by name.

import pprint
model = genai.get_model('models/gemini-1.5-flash')
pprint.pprint(model)
`name` The name of the model to fetch. Should start with `models/`
`client` The client to use.
`request_options` Options for the request.
A types.Model