-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(sessions): add display_name to create, list, get functions #3480
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 @dylan-apex, 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 enhances the session management system by adding a 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 successfully adds support for display_name when creating and listing sessions, which is a great enhancement for user experience. The changes are well-implemented across the different session service implementations (InMemory, Database, Sqlite). The addition of unit tests ensures the new functionality is working as expected and is properly persisted.
One area for improvement is in src/google/adk/sessions/vertex_ai_session_service.py. The create_session method signature should be updated to explicitly include the display_name parameter to match the base class BaseSessionService. Currently, it's being passed implicitly through **kwargs, which is less clear and breaks the interface contract defined by the abstract base class.
I've also left a specific comment regarding a potential bug in vertex_ai_session_service.py where a display_name with a falsy value (like an empty string) would be incorrectly converted to None.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…adk-python into add-display-name-to-sessions
|
/gemini review |
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 support for a display_name when creating and listing sessions, which improves user experience. The changes are well-implemented across various session services, including the base class, in-memory, database, and SQLite implementations. The necessary database schema updates and API request models are also included, along with corresponding unit tests.
My review has identified a couple of areas for improvement in VertexAiSessionService:
- The
create_sessionmethod signature should be updated to align with the base class. - There are some redundant
or Nonechecks that can be simplified for better code consistency and readability.
Overall, this is a solid feature addition. Addressing these points will improve the code's maintainability and adherence to design principles.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…adk-python into add-display-name-to-sessions
|
@hangfei No one was assigned to this PR to review it - don't want it to get lost. |
|
Fixed failing pytest - I think I forgot to merge this or something. |
|
Hi @dylan-apex ,Thank you for your contribution! We appreciate you taking the time to submit this pull request. |
Link to Issue or Description of Change
Problem:
Add support for
display_namewhen creating and listing sessions to have a better user experience when viewing several sessions in a list to better tell which is which.Solution:
Add
display_nametoBaseSessionServiceand update all the SessionServices that inherit to add support for this as well.Testing Plan
Created new unit tests to cover adding a display_name and used existing tests to verify it was
NoneTested the VertexAI Reasoning Engine locally
Unit Tests:
====================== 3139 passed, 2396 warnings in 42.29s =======================
Manual End-to-End (E2E) Tests:
Checklist