mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-07 07:08:31 +00:00
more fixes
This commit is contained in:
@@ -344,12 +344,11 @@ class Agent(BaseAgent):
|
||||
|
||||
def get_delegation_tools(self, agents: Sequence[BaseAgent]) -> Sequence[BaseTool]:
|
||||
# If delegate_to is specified, use those agents instead of all agents
|
||||
agents_to_use: List[BaseAgent]
|
||||
if self.delegate_to is not None:
|
||||
agents_to_use: Sequence[BaseAgent] = cast(
|
||||
List[BaseAgent], list(self.delegate_to)
|
||||
)
|
||||
agents_to_use = cast(List[BaseAgent], list(self.delegate_to))
|
||||
else:
|
||||
agents_to_use: Sequence[BaseAgent] = cast(List[BaseAgent], list(agents))
|
||||
agents_to_use = list(agents) # Convert to list to match expected type
|
||||
|
||||
agent_tools = AgentTools(agents=agents_to_use)
|
||||
delegation_tools = agent_tools.tools()
|
||||
|
||||
Reference in New Issue
Block a user