VertexAI is Google’s cloud platform for building, training, and deploying machine learning models.

We recommend experimenting to find the best-suited model for your use-case. Here are some general recommendations:

  • gemini-1.5-flash is good for most use-cases.
  • gemini-2.0-flash-exp is their strongest model.

Authentication

Authenticate with Gcloud

Example

Use Gemini with your Agent:

View more examples here.

Params

ParameterTypeDefaultDescription
idstr"gemini-2.0-flash-exp"The specific model ID used for generating responses.
namestr"Gemini"The name identifier for the agent.
providerstr"VertexAI"The provider of the model.
function_declarationsOptional[List[FunctionDeclaration]]NoneA list of function declarations that the model can utilize during the response generation process.
generation_configOptional[Any]NoneConfiguration settings for the generation process, such as parameters for controlling output behavior.
safety_settingsOptional[Any]NoneSettings related to safety measures, ensuring the generation of appropriate and safe content.
generative_model_request_paramsOptional[Dict[str, Any]]NoneAdditional parameters for the generative model requests.
clientOptional[GenerativeModel]NoneA pre-configured instance of the Gemini client.

Gemini is a subclass of the Model class and has access to the same params.