mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 23:32:39 +00:00
include agentFinish as part of step callback
This commit is contained in:
@@ -64,14 +64,15 @@ class CrewAgentExecutor(AgentExecutor):
|
|||||||
intermediate_steps,
|
intermediate_steps,
|
||||||
run_manager=run_manager,
|
run_manager=run_manager,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.step_callback:
|
||||||
|
self.step_callback(next_step_output)
|
||||||
|
|
||||||
if isinstance(next_step_output, AgentFinish):
|
if isinstance(next_step_output, AgentFinish):
|
||||||
return self._return(
|
return self._return(
|
||||||
next_step_output, intermediate_steps, run_manager=run_manager
|
next_step_output, intermediate_steps, run_manager=run_manager
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.step_callback:
|
|
||||||
self.step_callback(next_step_output)
|
|
||||||
|
|
||||||
intermediate_steps.extend(next_step_output)
|
intermediate_steps.extend(next_step_output)
|
||||||
if len(next_step_output) == 1:
|
if len(next_step_output) == 1:
|
||||||
next_step_action = next_step_output[0]
|
next_step_action = next_step_output[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user