Skip to content

Commit f668a5d

Browse files
seanzhougooglecopybara-github
authored andcommitted
chore: Update comments about why we can return upon flushing audio caches
Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com> PiperOrigin-RevId: 855788674
1 parent a5f0d33 commit f668a5d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/google/adk/flows/llm_flows/base_llm_flow.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,12 @@ async def _postprocess_live(
633633
for event in flushed_events:
634634
yield event
635635
if flushed_events:
636+
# NOTE below return is O.K. for now, because currently we only flush
637+
# events on interrupted or turn_complete. turn_complete is a pure
638+
# control event and interrupted is not with content but those content
639+
# is ignorable because model is already interrupted. If we have other
640+
# case to flush events in the future that are not pure control events,
641+
# we should not return here.
636642
return
637643

638644
# Builds the event.

0 commit comments

Comments
 (0)