Skip to content

A programming framework for agentic AI

Fix double await (#195)

Jack Gerrits2191b3144bff
diff --git a/python/examples/tool-use/coding_one_agent_direct.py b/python/examples/tool-use/coding_one_agent_direct.py
index 90e79eed7..1c0d33996 100644
--- a/python/examples/tool-use/coding_one_agent_direct.py
+++ b/python/examples/tool-use/coding_one_agent_direct.py
@@ -84,7 +84,7 @@ class ToolEnabledAgent(TypeRoutedAgent):
# Keep executing the tools until the response is not a list of function calls.
while isinstance(response.content, list) and all(isinstance(item, FunctionCall) for item in response.content):
results: List[ToolExecutionTaskResult] = await asyncio.gather(
- *[await self.send_message(ToolExecutionTask(function_call=call), self.id) for call in response.content]
+ *[self.send_message(ToolExecutionTask(function_call=call), self.id) for call in response.content]
)
# Combine the results into a single response.
result = FunctionExecutionResultMessage(content=[result.result for result in results])