passing cloned agents when copying context (#885)

This commit is contained in:
WellyngtonF
2024-07-07 12:58:38 -03:00
committed by GitHub
parent b56d584efc
commit 33ece82e08

View File

@@ -291,7 +291,7 @@ class Task(BaseModel):
copied_data = {k: v for k, v in copied_data.items() if v is not None}
cloned_context = (
[task.copy() for task in self.context] if self.context else None
[task.copy(agents) for task in self.context] if self.context else None
)
def get_agent_by_role(role: str) -> Union["BaseAgent", None]: