From daed4561255958b3c25f1217f90996ccd5ffd8af Mon Sep 17 00:00:00 2001 From: Rasheedat atinuke jamiu <56790407+RashRAJ@users.noreply.github.com> Date: Fri, 18 Apr 2025 21:37:17 +0100 Subject: [PATCH] Fix AttributeError in run_live when using AgentTool (#274) Co-authored-by: Hangfei Lin --- src/google/adk/flows/llm_flows/functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/adk/flows/llm_flows/functions.py b/src/google/adk/flows/llm_flows/functions.py index d1b6f84..805957e 100644 --- a/src/google/adk/flows/llm_flows/functions.py +++ b/src/google/adk/flows/llm_flows/functions.py @@ -310,7 +310,7 @@ async def _process_function_live_helper( function_response = { 'status': f'No active streaming function named {function_name} found' } - elif inspect.isasyncgenfunction(tool.func): + elif hasattr(tool, "func") and inspect.isasyncgenfunction(tool.func): print('is async') # for streaming tool use case