This commit is contained in:
Martín Bravo 2025-03-25 19:18:57 +01:00
parent 3068e42029
commit 70aff1d39d

View file

@ -111,7 +111,7 @@ def get_all_edges(agent: Agent, parent: Optional[Agent] = None) -> str:
"{agent.name}" -> "{handoff.name}";""") "{agent.name}" -> "{handoff.name}";""")
parts.append(get_all_edges(handoff, agent)) parts.append(get_all_edges(handoff, agent))
if not agent.handoffs and not isinstance(agent, Tool): # type: ignore if not agent.handoffs and not isinstance(agent, Tool): # type: ignore
parts.append(f'"{agent.name}" -> "__end__";') parts.append(f'"{agent.name}" -> "__end__";')
return "".join(parts) return "".join(parts)