recreating executor upon setting new step_callback

This commit is contained in:
João Moura
2024-02-09 01:52:28 -08:00
parent a1e0596450
commit d36c2a74cb
2 changed files with 4 additions and 3 deletions

View File

@@ -177,6 +177,7 @@ class Crew(BaseModel):
agent.i18n = I18N(language=self.language)
if (self.step_callback) and (not agent.step_callback):
agent.step_callback = self.step_callback
agent.create_agent_executor()
if self.process == Process.sequential:
return self._run_sequential_process()