You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
fix: Update the code to work with either 1 event or more than 1 events
Update the code to work with either 1 event or more than 1 events. PiperOrigin-RevId: 842406345
This commit is contained in:
committed by
Copybara-Service
parent
ee743bd19a
commit
4f54660d6d
@@ -469,10 +469,7 @@ class LlmAgent(BaseAgent):
|
||||
|
||||
if ctx.is_resumable:
|
||||
events = ctx._get_events(current_invocation=True, current_branch=True)
|
||||
if events and (
|
||||
ctx.should_pause_invocation(events[-1])
|
||||
or ctx.should_pause_invocation(events[-2])
|
||||
):
|
||||
if events and any(ctx.should_pause_invocation(e) for e in events[-2:]):
|
||||
return
|
||||
# Only yield an end state if the last event is no longer a long running
|
||||
# tool call.
|
||||
|
||||
Reference in New Issue
Block a user