You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update links and model versions on Google / Gemini model page (#185)
This PR proposes the following updates to the Google / Gemini model
provider page in the Agno docs:
- Updates model versions for Gemini 2.x model series
- Adds more documentation links for both Google AI Studio and Vertex AI
- Adds more detail around Vertex AI project creation and config
P.S. Thanks for the great OSS framework!
Copy file name to clipboardExpand all lines: models/google.mdx
+17-13Lines changed: 17 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,23 @@
2
2
title: Gemini
3
3
---
4
4
5
-
Use Google's Gemini models through Google AI Studio - a platform providing access to large language models. Learn more [here](https://ai.google.dev/aistudio).
5
+
Use Google's Gemini models through [Google AI Studio](https://ai.google.dev/gemini-api/docs) or [Google Cloud Vertex AI](https://cloud.google.com/vertex-ai/generative-ai/docs/overview) - platforms that provide access to large language models and other services.
6
6
7
-
We recommend experimenting to find the best-suited model for your use-case. Here are some general recommendations:
7
+
We recommend experimenting to find the best-suited model for your usecase. Here are some general recommendations in the Gemini `2.x` family of models:
8
8
9
-
-`gemini-1.5-flash` is good for most use-cases.
10
-
-`gemini-1.5-flash-8b` is their most cost-effective model.
11
-
-`gemini-2.0-flash-exp` is their strongest multi-modal model.
9
+
-`gemini-2.0-flash` is good for most use-cases.
10
+
-`gemini-2.0-flash-lite` is the most cost-effective model.
11
+
-`gemini-2.5-pro-exp-03-25` is the strongest multi-modal model.
12
+
13
+
Refer to the [Google AI Studio documentation](https://ai.google.dev/gemini-api/docs/models) and the [Vertex AI documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models) for information on available model versions.
12
14
13
15
## Authentication
14
16
15
17
You can use Gemini models through either Google AI Studio or Google Cloud's Vertex AI:
16
18
17
19
### Google AI Studio
18
20
19
-
Set your`GOOGLE_API_KEY` environment variable. You can get one [from Google here](https://ai.google.dev/aistudio).
21
+
Set the`GOOGLE_API_KEY` environment variable. You can get one [from Google AI Studio](https://ai.google.dev/gemini-api/docs/api-key).
20
22
21
23
<CodeGroup>
22
24
@@ -32,15 +34,17 @@ setx GOOGLE_API_KEY ***
32
34
33
35
### Vertex AI
34
36
35
-
To use Vertex AI:
37
+
To use Vertex AI in Google Cloud:
38
+
39
+
1. Refer to the [Vertex AI documentation](https://cloud.google.com/vertex-ai/docs/start/cloud-environment) to set up a project and development environment.
36
40
37
-
1. Install Google Cloud CLI and authenticate. More details [here](https://cloud.google.com/vertex-ai/generative-ai/docs/start/quickstarts/quickstart-multimodal#setup-local).
41
+
2. Install the `gcloud` CLI and authenticate (refer to the [quickstart](https://cloud.google.com/vertex-ai/generative-ai/docs/start/quickstarts/quickstart-multimodal) for more details):
38
42
39
43
```bash
40
44
gcloud auth application-default login
41
45
```
42
46
43
-
2. Enable Vertex AI API and set variables:
47
+
3. Enable Vertex AI API and set the project ID environment variable (alternatively, you can set `project_id` in the `Agent` config):
44
48
45
49
Exportthefollowingvariables:
46
50
@@ -75,14 +79,14 @@ from agno.models.google import Gemini
75
79
76
80
# Using Google AI Studio
77
81
agent = Agent(
78
-
model=Gemini(id="gemini-1.5-flash"),
82
+
model=Gemini(id="gemini-2.0-flash"),
79
83
markdown=True,
80
84
)
81
85
82
86
# Or using Vertex AI
83
87
agent = Agent(
84
88
model=Gemini(
85
-
id="gemini-1.5-flash",
89
+
id="gemini-2.0-flash",
86
90
vertexai=True,
87
91
project_id="your-project-id", # Optional if GOOGLE_CLOUD_PROJECT is set
0 commit comments