Skip to content

Commit

Permalink
feat(generative-ai): Update Gemini model versions (#11795)
Browse files Browse the repository at this point in the history
## Description

Fixes 

- Update the Gemini 1.0 vision model with the 1.5 Flash model.

## Checklist
- [x] **Tests** pass:   `nox -s py-3.9` (see [Test Environment Setup](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
- [x] **Lint** pass:   `nox -s lint` (see [Test Environment Setup](https://togithub.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
- [x ] Please **merge** this PR for me once it is approved
  • Loading branch information
gericdong authored May 24, 2024
1 parent 4e271eb commit 2550c00
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion generative_ai/gemini_multi_image_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def generate_text_multimodal(project_id: str) -> str:
mime_type="image/png",
)

model = GenerativeModel(model_name="gemini-1.0-pro-vision-001")
model = GenerativeModel(model_name="gemini-1.5-flash-001")
response = model.generate_content(
[
image_file1,
Expand Down
2 changes: 1 addition & 1 deletion generative_ai/gemini_pro_basic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def generate_text(project_id: str) -> None:

vertexai.init(project=project_id, location="us-central1")

model = GenerativeModel(model_name="gemini-1.0-pro-vision-001")
model = GenerativeModel(model_name="gemini-1.5-flash-001")

image_file = Part.from_uri(
"gs://cloud-samples-data/generative-ai/image/scones.jpg", "image/jpeg"
Expand Down
2 changes: 1 addition & 1 deletion generative_ai/gemini_single_turn_video_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def generate_text(project_id: str) -> str:

vertexai.init(project=project_id, location="us-central1")

vision_model = GenerativeModel(model_name="gemini-1.0-pro-vision-001")
vision_model = GenerativeModel(model_name="gemini-1.5-flash-001")

# Generate text
response = vision_model.generate_content(
Expand Down

0 comments on commit 2550c00

Please sign in to comment.