Skip to content

Commit 1f9f0fe

Browse files
google-genai-botcopybara-github
authored andcommitted
fix: error when event does not contain long_running_tool_ids
PiperOrigin-RevId: 886852929
1 parent 0e93faf commit 1f9f0fe

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/google/adk/a2a/converters/long_running_functions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ def process_event(self, event: Event) -> Event:
7474
for part in event.content.parts:
7575
should_remove = False
7676
if part.function_call:
77-
if part.function_call.id in event.long_running_tool_ids:
77+
if (
78+
event.long_running_tool_ids
79+
and part.function_call.id in event.long_running_tool_ids
80+
):
7881
if not event.partial:
7982
self._parts.append(part)
8083
self._long_running_tool_ids.add(part.function_call.id)

0 commit comments

Comments
 (0)