Question about the new rewind feature #3362
Replies: 1 comment
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: The Hi! Thank you for your questions about the "rewind to previous invocation" feature. Use CasesYour intuition is correct. The primary use case for How it WorksThe Example UsageYou are correct that from google.adk import runners
# Assume 'runner' is an initialized ADK runner
# and we have a session with previous invocations
session = await runner.get_session_async(user_id, session_id)
# Choose an invocation ID to rewind to
invocation_to_rewind_before = "some_invocation_id"
# This will revert the session to the state it was in
# just before 'some_invocation_id' was processed
await runner.rewind_async(
user_id=user_id,
session_id=session_id,
rewind_before_invocation_id=invocation_to_rewind_before
)I hope this clarifies how the rewind feature works and how you can use it in your projects. [1] https://github.com/google/adk-python/blob/main/tests/unittests/runners/test_runner_rewind.py |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, could you please clarify some questions about the new "rewind to previous invocation" feature?
rewind_asyncmethod was added to therunnerbut it's not being used anywhere. Could you please provide some examples on how to use it?Thank you!
Beta Was this translation helpful? Give feedback.
All reactions