mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28: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]:
|
def get_delegation_tools(self, agents: Sequence[BaseAgent]) -> Sequence[BaseTool]:
|
||||||
# If delegate_to is specified, use those agents instead of all agents
|
# If delegate_to is specified, use those agents instead of all agents
|
||||||
|
agents_to_use: List[BaseAgent]
|
||||||
if self.delegate_to is not None:
|
if self.delegate_to is not None:
|
||||||
agents_to_use: Sequence[BaseAgent] = cast(
|
agents_to_use = cast(List[BaseAgent], list(self.delegate_to))
|
||||||
List[BaseAgent], list(self.delegate_to)
|
|
||||||
)
|
|
||||||
else:
|
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)
|
agent_tools = AgentTools(agents=agents_to_use)
|
||||||
delegation_tools = agent_tools.tools()
|
delegation_tools = agent_tools.tools()
|
||||||
|
|||||||
Reference in New Issue
Block a user