capture result from recursive call

This commit is contained in:
Brandon Hancock
2024-07-15 13:59:58 -04:00
parent a02d2fb93e
commit 641921eb6c

View File

@@ -203,7 +203,7 @@ class Agent(BaseAgent):
self._times_executed += 1
if self._times_executed > self.max_retry_limit:
raise e
return self.execute_task(task, context, tools)
result = self.execute_task(task, context, tools)
if self.max_rpm:
self._rpm_controller.stop_rpm_counter()