From f7b436a98519fda026409882f271c40b7375ab23 Mon Sep 17 00:00:00 2001 From: Hangfei Lin Date: Sun, 20 Apr 2025 16:04:19 -0700 Subject: [PATCH] No public description COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/282 from hangfei:main 7b9c5e3bff76ed475fb57d45333a9ab135cac32d PiperOrigin-RevId: 749616712 --- src/google/adk/flows/llm_flows/functions.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/google/adk/flows/llm_flows/functions.py b/src/google/adk/flows/llm_flows/functions.py index d1b6f84..7c5fcfb 100644 --- a/src/google/adk/flows/llm_flows/functions.py +++ b/src/google/adk/flows/llm_flows/functions.py @@ -310,9 +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): - print('is async') - + elif hasattr(tool, "func") and inspect.isasyncgenfunction(tool.func): # for streaming tool use case # we require the function to be a async generator function async def run_tool_and_update_queue(tool, function_args, tool_context):