feat(sessions): add get_events() and filter_events() methods to Session#4960
feat(sessions): add get_events() and filter_events() methods to Session#4960ecanlar wants to merge 3 commits intogoogle:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Response from ADK Triaging Agent Hello @ecanlar, thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA). It seems the Thanks! |
6648a5b to
f024441
Compare
|
Hi @ecanlar , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Can you please fix the formatting errrors. You can use autoformat.sh |
|
Hi @rohityan, formatting errors are fixed by running |
|
I've just pushed a commit that adds full support for nested Pydantic models! |
Summary
This PR implements event filtering capabilities for the Session class to support rewind operations.
Changes
get_events()method: Provides a consistent API for accessing all session eventsfilter_events()method: Allows filtering events with options to exclude rewound eventsKey Features
get_events(): Returns all events in the sessionfilter_events(exclude_rewound=True): Returns filtered events, excluding those invalidated by rewind operationsTesting
The implementation includes comprehensive unit tests in
test_session_filter_events.pycovering:Files Changed
src/google/adk/sessions/session.py- Added get_events() and filter_events() methods with rewind filtering logictests/unittests/sessions/test_session_filter_events.py- Comprehensive unit testsRelated Issue
Fixes #4959