-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Add code snippets for Agent Engine #13735
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
|
Here is the summary of possible violations 😱 DetailsThere are 5 possible violations for not having product prefix.
The end of the violation section. All the stuff below is FYI purposes only. Here is the summary of changes. You are about to add 5 region tags.
This comment is generated by snippet-bot.
|
Summary of ChangesHello @yeesian, 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 introduces a comprehensive new Python code sample designed to guide users through the process of building and deploying agents using the Vertex AI Agent Engine and Agent Development Kit (ADK). The sample provides an end-to-end demonstration, covering the definition of a custom tool for an agent, agent initialization, local and remote testing, and deployment to Vertex AI, ultimately addressing issue #13734. It aims to simplify the understanding and implementation of custom agent functionalities within the Google Cloud ecosystem. 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 adds a new quickstart example for the Agent Engine using the ADK. The new code contains several critical issues that will prevent it from running, including a SyntaxError due to using async for in a synchronous function, an IndentationError, and a NameError from an incorrect type hint. I've also pointed out some areas for improvement regarding error handling, type hints, and code style consistency. Addressing these issues will make the sample code correct and robust.
| f"https://api.frankfurter.app/{currency_date}", | ||
| params={"from": currency_from, "to": currency_to}, | ||
| ) | ||
| return response.json() |
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.
The HTTP request to the Frankfurter API does not handle potential errors, such as network issues or non-200 status codes. This could lead to unexpected behavior or crashes if the API is unavailable or returns an error. It's good practice to check for a successful response by adding response.raise_for_status() before this line.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Description
This PR is not ready to be reviewed or merged yet. I'm just trying out an example/sample for #13734
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
nox -s py-3.9(see Test Environment Setup)nox -s lint(see Test Environment Setup)