MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / stop_condition

Function stop_condition

src/hyperagent/agents/plan_seeking.py:239–245  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

237 groupchat = GroupChat(agents=[navigator, editor, executor, planner], messages=[], max_round=20, speaker_selection_method=custom_speaker_selection_func)
238
239 def stop_condition(msg):
240 if "Final Answer"in msg["content"]:
241 return True
242 elif all([agent_name not in msg["content"] for agent_name in ["Navigator", "Editor", "Executor"]]) and msg["name"] == "Planner":
243 return True
244 else:
245 return False
246 manager = GroupChatManager(name="hyperagent", groupchat=groupchat, llm_config={"config_list": llm_config["plan"]}, is_termination_msg=lambda msg: stop_condition(msg))
247 return manager

Callers 1

load_managerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected