Skip to content

Commit

Permalink
[] is false
Browse files Browse the repository at this point in the history
  • Loading branch information
yenif committed Jan 11, 2024
1 parent be3a1d2 commit 0fe43fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autogen/agentchat/conversable_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ def generate_tool_calls_reply(
"content": func_return.get("content", ""),
}
)
if len(tool_returns) > 0:
if tool_returns:
return True, {
"role": "tool",
"tool_responses": tool_returns,
Expand Down Expand Up @@ -907,7 +907,7 @@ async def a_generate_tool_calls_reply(
func = self._function_map.get(tool_call.get("function", {}).get("name", None), None)
if func and asyncio.coroutines.iscoroutinefunction(func):
async_tool_calls.append(self._a_execute_tool_call(tool_call))
if len(async_tool_calls) > 0:
if async_tool_calls:
tool_returns = await asyncio.gather(*async_tool_calls)
return True, {
"role": "tool",
Expand Down

0 comments on commit 0fe43fe

Please sign in to comment.