Skip to content

feat(genai/embeddings/multimodal): Add multimodal video embedding example - #14514

Merged
holtskinner merged 3 commits into
mainfrom
feat(embeddings/multimodal)_add_sample_multimodal_embedding_video
Aug 18, 2026
Merged

feat(genai/embeddings/multimodal): Add multimodal video embedding example#14514
holtskinner merged 3 commits into
mainfrom
feat(embeddings/multimodal)_add_sample_multimodal_embedding_video

Conversation

@Kef131

@Kef131 Kef131 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #
b/546128007

Add new example for generating multimodal videos embeddings using the Gemini API and corresponding test.

  • Added multimodal_embedding_video.py implementing an example of embedding image and text content using the Gemini embedding model (gemini-embedding-2).
  • Changed the default GOOGLE_CLOUD_LOCATION for tests from us-central1 to global for broader compatibility.
image image

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

@Kef131
Kef131 requested review from a team as code owners August 17, 2026 17:47
@snippet-bot

snippet-bot Bot commented Aug 17, 2026

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@Kef131
Kef131 marked this pull request as draft August 17, 2026 17:47

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new example and test for multimodal video embedding using the gemini-embedding-2 model. The feedback highlights that changing the global GOOGLE_CLOUD_LOCATION environment variable to global can break other regional tests like model tuning; it is recommended to revert this change and use monkeypatch to set the location locally for the video embedding test. Additionally, the reviewer suggests constructing the Part object directly with file_data and video_metadata instead of mutating it after creation to ensure robustness and idiomatic code.

Comment thread genai/embeddings/test_embeddings_examples.py
Comment thread genai/embeddings/multimodal_embedding_video.py Outdated
Comment thread genai/embeddings/test_embeddings_examples.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

@angelcaamal angelcaamal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@XrossFox XrossFox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Kef131
Kef131 marked this pull request as ready for review August 17, 2026 22:14
Comment thread genai/embeddings/multimodal_embedding_video.py
@holtskinner
holtskinner merged commit 4dbc521 into main Aug 18, 2026
14 of 22 checks passed
@holtskinner
holtskinner deleted the feat(embeddings/multimodal)_add_sample_multimodal_embedding_video branch August 18, 2026 15:43
@Kef131 Kef131 self-assigned this Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants