feat(genai/embeddings/multimodal): Add genai multimodal embedding image sample - #14511
feat(genai/embeddings/multimodal): Add genai multimodal embedding image sample #14511Kef131 wants to merge 2 commits into
Conversation
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Code Review
This pull request adds a new example and test for generating multimodal embeddings from an image and text using the Google GenAI SDK. The review feedback correctly identifies three key issues: an incorrect model name ('gemini-embedding-2' instead of 'multimodal-embedding-001'), an invalid regional location setting ('global' instead of 'us-central1') in the test environment, and an overly generic return type hint ('object' instead of 'types.EmbedContentResponse') in the new module.
Description
Fixes #
b/546136656
Add new example for generating multimodal image embeddings using the Gemini API and corresponding test to the test
multimodal_embedding_image.pyimplementing an example of embedding image and text content using the Gemini embedding model (gemini-embedding-2).GOOGLE_CLOUD_LOCATIONfor tests fromus-central1toglobalfor broader compatibility.Checklist
Testing
Compliance & Style
Post-Approval Actions