[BUG-FIX] Reflexion Agent task attribute error

pull/1205/head
Aksh Parekh 1 day ago
parent 7e5974b05d
commit 822d81fc5e

@ -284,6 +284,10 @@ class ReasoningAgentRouter:
The result of the reasoning process (format depends on agent and output_type).
"""
try:
if self.swarm_type == "ReflexionAgent":
swarm = self.select_swarm()
return swarm.run(tasks=[task], *args, **kwargs)
else:
swarm = self.select_swarm()
return swarm.run(task=task, *args, **kwargs)
except Exception as e:

Loading…
Cancel
Save