Made to be more descriptive from comments
This commit is contained in:
parent
066514e2a9
commit
e5e77381f0
2 changed files with 4 additions and 1 deletions
|
|
@ -25,6 +25,8 @@ Preferably all in a single place.
|
|||
class BaseAgent:
|
||||
def agent_primitives(self) -> list[BaseAgent]:
|
||||
# Returns a list of Agents that are utilized by this agent to generate inputs
|
||||
# We use agent primitives here instead of subagents because these are going to be part
|
||||
# of the message graph, not a subagent tool call.
|
||||
raise NotImplementedError
|
||||
|
||||
def tools(self) -> list[BaseTool]:
|
||||
|
|
@ -37,7 +39,7 @@ class BaseAgent:
|
|||
tools = self.tools()
|
||||
for agent in self.agent_primitives():
|
||||
tools.extend(agent.tools())
|
||||
tools = set(tools)
|
||||
tools = remove_duplicates(tools)
|
||||
tools = initialize_tools(tools, config)
|
||||
return self(llm, tools, config, *args, **kwargs)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue