-
Notifications
You must be signed in to change notification settings - Fork 6.6k
docs(genai): Update quickstart_example.py to use us-east4 as default region #13577
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @holtskinner, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
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 correctly updates the region from us-central1
to us-east4
in the quickstart example, addressing the new access restrictions on us-central1
. However, the change appears to be incomplete as several other files in the generative_ai/rag/
directory still use the us-central1
region. To ensure all examples and tests function correctly for all users, I recommend extending this change to all relevant files. The files that still reference us-central1
include:
generative_ai/rag/test_rag_examples.py
generative_ai/rag/create_corpus_example.py
generative_ai/rag/generate_content_example.py
generative_ai/rag/retrieval_query_example.py
Updating these files as part of this PR will ensure consistency across the codebase.
|
||
# Initialize Vertex AI API once per session | ||
vertexai.init(project=PROJECT_ID, location="us-central1") | ||
vertexai.init(project=PROJECT_ID, location="us-east4") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve maintainability and consistency with other files in this directory (like test_rag_examples.py
), consider defining the location as a module-level constant (e.g., LOCATION = "us-east4"
) at the top of the file and using that constant here. This makes it easier to update the region in the future if needed.
Description