adk-go
adk-go copied to clipboard
Add vertexAi session service
python ref: https://github.com/google/adk-python/blob/0ccc43cf49dc0882dc896455d6603a602d8a28e7/src/google/adk/sessions/vertex_ai_session_service.py
Fixes https://github.com/google/adk-go/issues/347
Summary of Changes
Hello @baptmont, I'm Gemini Code Assist[^1]! 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 significantly enhances the application's ability to manage sessions within Google Cloud's Vertex AI platform. It introduces a specialized Vertex AI session service, moving from a more generalized approach to a dedicated, API-driven implementation. This change provides a more structured and robust way to handle session lifecycle and event logging, ensuring better integration and scalability with Vertex AI reasoning engines.
Highlights
- New Vertex AI Session Service: Introduced a dedicated
session/vertexaipackage to provide a robust session service implementation for Vertex AI, aligning with the Python ADK reference. - Refactored Session Logic: The previous generic
session.VertexAIServicefunction has been removed and its functionality, along with detailed session management, is now encapsulated within the newsession/vertexaipackage. - Vertex AI API Integration: A new
vertexAiClienthas been added to handle interactions with the Google Cloud AI Platform API (specificallyapiv1beta1), enabling creation, retrieval, listing, deletion of sessions, and event management for Vertex AI Reasoning Engines. - Updated Example Usage: The
examples/vertexai/agent.gofile has been updated to utilize the newvertexai.NewSessionServiceand now requires environment variables (CLOUD_PROJECT_ID,CLOUD_LOCATION,VERTEX_ENGINE_ID) for configuration. A new exampleexamples/vertexai/vertexengine/create_engine.godemonstrates how to create a Vertex AI Reasoning Engine. - Dependency Updates: The
go.modandgo.sumfiles have been updated to includecloud.google.com/go/aiplatformandgoogle.golang.org/protobufdependencies, necessary for interacting with the Vertex AI API.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| 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 pull request 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 :thumbsup: and :thumbsdown: 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.
[^1]: 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.
missing state scopes currently only text events are stored
/gemini review