fix: do not convert "false" value to dict

This causes information loss, and is unexpected from user.

PiperOrigin-RevId: 764558190
This commit is contained in:
Google Team Member
2025-05-28 21:56:16 -07:00
committed by Copybara-Service
parent b70e74c450
commit 60ceea72bd
2 changed files with 26 additions and 2 deletions

View File

@@ -107,9 +107,9 @@ You could retry calling this tool, but it is IMPORTANT for you to provide all th
or hasattr(self.func, '__call__')
and inspect.iscoroutinefunction(self.func.__call__)
):
return await self.func(**args_to_call) or {}
return await self.func(**args_to_call)
else:
return self.func(**args_to_call) or {}
return self.func(**args_to_call)
# TODO(hangfei): fix call live for function stream.
async def _call_live(