Refactor get_all_edges function to remove unused parent parameter
This commit is contained in:
parent
d8922ff472
commit
b9d32cda0f
1 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ def get_all_nodes(agent: Agent, parent: Optional[Agent] = None) -> str:
|
||||||
return "".join(parts)
|
return "".join(parts)
|
||||||
|
|
||||||
|
|
||||||
def get_all_edges(agent: Agent, parent: Optional[Agent] = None) -> str:
|
def get_all_edges(agent: Agent) -> str:
|
||||||
"""
|
"""
|
||||||
Recursively generates the edges for the given agent and its handoffs in DOT format.
|
Recursively generates the edges for the given agent and its handoffs in DOT format.
|
||||||
|
|
||||||
|
|
@ -97,7 +97,7 @@ def get_all_edges(agent: Agent, parent: Optional[Agent] = None) -> str:
|
||||||
if isinstance(handoff, Agent):
|
if isinstance(handoff, Agent):
|
||||||
parts.append(f"""
|
parts.append(f"""
|
||||||
"{agent.name}" -> "{handoff.name}";""")
|
"{agent.name}" -> "{handoff.name}";""")
|
||||||
parts.append(get_all_edges(handoff, agent))
|
parts.append(get_all_edges(handoff))
|
||||||
|
|
||||||
return "".join(parts)
|
return "".join(parts)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue