Merge branch 'main' of github.com:joaomdmoura/crewAI into temp-feature/replay_from_task

This commit is contained in:
Lorenze Jay
2024-07-11 07:23:43 -07:00

View File

@@ -303,8 +303,6 @@ class Task(BaseModel):
)
def get_agent_by_role(role: str) -> Union["BaseAgent", None]:
if agents is None:
return None
return next((agent for agent in agents if agent.role == role), None)
cloned_agent = get_agent_by_role(self.agent.role) if self.agent else None