Fix AttributeError in run_live when using AgentTool (#274)

Co-authored-by: Hangfei Lin <hangfei@google.com>
This commit is contained in:
Rasheedat atinuke jamiu 2025-04-18 21:37:17 +01:00 committed by GitHub
parent 30b1722cca
commit daed456125
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -310,7 +310,7 @@ async def _process_function_live_helper(
function_response = { function_response = {
'status': f'No active streaming function named {function_name} found' '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') print('is async')
# for streaming tool use case # for streaming tool use case