Use Google’s AI Studio to access the Gemini and Gemma models.

Authentication

Set your GOOGLE_API_KEY environment variable. You can get one from Google here.

Example

Use Gemini with your Assistant:

Params

name
str
default: "Gemini"

The name identifier for the assistant.

model
str
default: "gemini-1.5-flash"

The specific model ID used for generating responses.

generation_config
Any

Configuration settings for the generation process, such as parameters for controlling output behavior.

safety_settings
Any

Settings related to safety measures, ensuring the generation of appropriate and safe content.

function_declarations
List[FunctionDeclaration]

A list of function declarations that the model can utilize during the response generation process.

api_key
str

Google API Key