Models
Gemini
GeminiTools
are a set of tools that allow an Agent to interact with Google AI API services for generating images and videos.
Prerequisites
Before using GeminiTools
, make sure to have the google-genai
library installed and the credentials configured.
-
Install the library:
-
Set your credentials:
- For Gemini API:
- For Vertex AI:
- For Gemini API:
Initialization
Import GeminiTools
and add it to your Agent’s tool list.
Usage Examples
GeminiTools can be used for a variety of tasks. Here are some examples:
Image Generation
image_generation_agent.py
Video Generation
Video generation requires Vertex AI.
video_generation_agent.py
Toolkit Functions
Function | Description |
---|---|
generate_image | Generate an image based on a text prompt |
generate_video | Generate a video based on a text prompt |
Developer Resources
- View Toolkit
- View Image Generation Guide
- View Video Generation Guide