Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(generative_ai): Add Vertex AI Express Mode Sample #12988

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

holtskinner
Copy link
Contributor

- https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview
- NOTE: This cannot be tested in our current infrastructure because Express Mode requires a new project set up with a Gmail account that has never used Google Cloud before
@holtskinner holtskinner requested review from a team as code owners December 11, 2024 18:58
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Dec 11, 2024
Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

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

Hi team,

I'm currently reviewing this pull request and will have a full review up in a few minutes. In the meantime, here's a quick summary to get everyone up to speed:

This PR adds a new sample demonstrating how to use Vertex AI's Express Mode with the Gemini model. The intent is to provide a clear, concise example of using the API key approach for generating content. The changes include:

  • A new Python file (generative_ai/express_mode/api_key_example.py) containing the sample code. This code shows how to initialize the Vertex AI client using an API key, create a GenerativeModel instance, and generate text using the generate_content method.
  • Updated requirements.txt and requirements-test.txt to include necessary dependencies.
  • A new noxfile_config.py file was added to configure testing. This file sets up the testing environment, specifying ignored Python versions and other testing configurations.

The author notes that this sample cannot be fully tested within the current infrastructure due to Express Mode's requirements for a new project and a fresh Gmail account. I'll keep this limitation in mind during my review.


And now, a little haiku to brighten your day:

Code flows like a stream,
New features, a welcome sight,
Reviews make it shine.

Thanks,
[Your Name]

Copy link

Gemini encountered an error creating the review. You can try again by commenting @code-review-assist review.

Copy link

snippet-bot bot commented Dec 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants