mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
adding agent step callback
This commit is contained in:
@@ -22,6 +22,7 @@ class CrewAgentExecutor(AgentExecutor):
|
||||
request_within_rpm_limit: Any = None
|
||||
max_iterations: Optional[int] = 15
|
||||
force_answer_max_iterations: Optional[int] = None
|
||||
step_callback: Optional[Any] = None
|
||||
|
||||
@root_validator()
|
||||
def set_force_answer_max_iterations(cls, values: Dict) -> Dict:
|
||||
@@ -67,7 +68,7 @@ class CrewAgentExecutor(AgentExecutor):
|
||||
return self._return(
|
||||
next_step_output, intermediate_steps, run_manager=run_manager
|
||||
)
|
||||
|
||||
self.step_callback(next_step_output)
|
||||
intermediate_steps.extend(next_step_output)
|
||||
if len(next_step_output) == 1:
|
||||
next_step_action = next_step_output[0]
|
||||
|
||||
Reference in New Issue
Block a user