-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Initial commit: Add V-Start application files #2282
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
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.
Summary of Changes
Hello @WafaeBakkali, 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 integrates a new application, V-Start
, into the repository. The application is added as a Git submodule, which means its source code is maintained in a separate repository and referenced here. This approach facilitates modularity and independent management of the V-Start
application's development lifecycle.
Highlights
- New Application Integration: Introduces the
V-Start
application by adding it as a Git submodule undervision/sample-apps/
.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
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 .gemini/
folder in the base of the repository. Detailed instructions can be found here.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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 introduces the V-Start sample application as a git submodule. While using submodules can be a valid approach for managing dependencies, adding it this way circumvents the code review process for the code contained within the submodule. The code at commit badea0b2ee79ff2a4164248c326c0463fe815317 has not been reviewed as part of this change, which poses a risk to the repository's quality and security. I've added a comment with suggestions on how to address this.
vision/sample-apps/V-Start/README.md
Outdated
|
||
1. **Clone the repository:** | ||
```bash | ||
git clone https://github.com/WafaeBakkali/V-Start.git |
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.
Update this to the new repo link
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.
Done
vision/sample-apps/V-Start/README.md
Outdated
|
||
* [Node.js](https://nodejs.org/) (v18 or later recommended) | ||
* npm (usually comes with Node.js) | ||
* A Google Gemini API Key. You can get one from [Google AI Studio](https://aistudio.google.com/app/apikey). |
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.
Is there a reason you're using the Gemini Developer API instead of Vertex AI, since you're already using other Google Cloud Services?
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.
Having two options is meant for flexibility. Many creative agencies that use Veo prefer a quick and simple setup for initial testing with an API Key, while other customers prefer the Vertex AI API
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.
Right, I would agree that the API key is easier for setup, however you end up using Google Cloud Secret Manager and Cloud Run later, which ends up using Google Cloud anyway and requires the same IAM/gcloud auth setup. This could probably be simpler to use Vertex AI for Gemini as well and not need to store the API Key in secret manager.
Co-authored-by: Holt Skinner <[email protected]>
Co-authored-by: Holt Skinner <[email protected]>
Co-authored-by: Holt Skinner <[email protected]>
Co-authored-by: Holt Skinner <[email protected]>
Co-authored-by: Holt Skinner <[email protected]>
Co-authored-by: Holt Skinner <[email protected]>
@holtskinner Thanks for all the feedback. I've addressed all the requested changes |
vision/sample-apps/V-Start/README.md
Outdated
|
||
* [Node.js](https://nodejs.org/) (v18 or later recommended) | ||
* npm (usually comes with Node.js) | ||
* A Google Gemini API Key. You can get one from [Google AI Studio](https://aistudio.google.com/app/apikey). |
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.
Right, I would agree that the API key is easier for setup, however you end up using Google Cloud Secret Manager and Cloud Run later, which ends up using Google Cloud anyway and requires the same IAM/gcloud auth setup. This could probably be simpler to use Vertex AI for Gemini as well and not need to store the API Key in secret manager.
Co-authored-by: Holt Skinner <[email protected]>
Co-authored-by: Holt Skinner <[email protected]>
vision/sample-apps/V-Start/server.js
Outdated
|
||
// Use a simple endpoint to validate the token | ||
// We'll try to list models which is a read-only operation | ||
const validationUrl = `https://us-central1-aiplatform.googleapis.com/v1/projects/${projectId}/locations/us-central1/models`; |
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.
It's recommended to use the JS Gen AI SDK rather than doing manual HTTP/REST Calls.
https://github.com/googleapis/js-genai
Can you please convert this over to use the Gen AI SDK?
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.
Done, and also updated GCloud Auth to be the default.
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.
@WafaeBakkali Not sure this change went through. Looks like you're still using the raw REST calls here
vision/sample-apps/V-Start/server.js
Outdated
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args)); | ||
|
||
// Import Google AI SDK (only for API key auth) | ||
const { GoogleGenerativeAI } = require('@google/generative-ai'); |
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.
@WafaeBakkali This is the deprecated SDK, you should be using the new Gen AI SDK for all requests for the Gemini Developer API and Vertex AI
https://github.com/googleapis/js-genai
Be sure to change this throughout
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.
Thanks for flagging this! I accidentally didn’t push the correct file, but that’s been fixed now. The project is fully using the new Gen AI SDK.
vision/sample-apps/V-Start/server.js
Outdated
|
||
// Use a simple endpoint to validate the token | ||
// We'll try to list models which is a read-only operation | ||
const validationUrl = `https://us-central1-aiplatform.googleapis.com/v1/projects/${projectId}/locations/us-central1/models`; |
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.
@WafaeBakkali Not sure this change went through. Looks like you're still using the raw REST calls here
Description
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
CONTRIBUTING
Guide.CODEOWNERS
for the file(s).nox -s format
from the repository root to format).Fixes #<issue_number_goes_here> 🦕