From f59704db44c6b78562ccd1ee429776a3e451fa5d Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Thu, 24 Jul 2025 16:31:00 -0700 Subject: [PATCH] fix docs protocols --- docs/mkdocs.yml | 24 ++++++++++++------------ swarms/structs/interactive_groupchat.py | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index c39ee197..e48e92a7 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -225,7 +225,15 @@ nav: - Quickstart: "quickstart.md" - Agents: "swarms/agents/index.md" - Multi-Agent Architectures: "swarms/structs/index.md" + + - Protocol: + - Overview: "protocol/overview.md" + - SIPs: "protocol/sip.md" - Feature Set: "swarms/features.md" + - Swarms Ecosystem: "swarms/ecosystem.md" + - Technical Support: "swarms/support.md" + + - Agents: - Overview: "swarms/framework/agents_explained.md" - Quickstart: "swarms/agents/index.md" @@ -316,10 +324,6 @@ nav: - Communication Structure: "swarms/structs/conversation.md" - - Protocol: - - Overview: "protocol/overview.md" - - SIPs: "protocol/sip.md" - - Tools: - Overview: "swarms_tools/overview.md" - BaseTool Reference: "swarms/tools/base_tool.md" @@ -343,10 +347,6 @@ nav: - Deploy on Phala: "swarms_cloud/phala_deploy.md" # - Deploy on FastAPI: "swarms_cloud/fastapi_deploy.md" - - More About Us: - - Swarms Ecosystem: "swarms/ecosystem.md" - - Technical Support: "swarms/support.md" - - Examples: - Overview: "examples/index.md" @@ -488,7 +488,7 @@ nav: - Understanding Swarms Architecture: "swarms/concept/framework_architecture.md" - Development Philosophy & Principles: "swarms/concept/philosophy.md" - - About Swarms: - - Vision & Mission: "swarms/concept/vision.md" - - Swarm Ecosystem: "swarms/concept/swarm_ecosystem.md" - - Products: "swarms/products.md" + # - About Swarms: + # - Vision & Mission: "swarms/concept/vision.md" + # - Swarm Ecosystem: "swarms/concept/swarm_ecosystem.md" + # - Products: "swarms/products.md" diff --git a/swarms/structs/interactive_groupchat.py b/swarms/structs/interactive_groupchat.py index f87a2091..53e786ff 100644 --- a/swarms/structs/interactive_groupchat.py +++ b/swarms/structs/interactive_groupchat.py @@ -963,15 +963,21 @@ Remember: You are part of a team. Your response should reflect that you've read, to respond to the user query. """ # Filter out invalid agents - valid_agents = [name for name in mentioned_agents if name in self.agent_map] - + valid_agents = [ + name + for name in mentioned_agents + if name in self.agent_map + ] + if not valid_agents: - raise AgentNotFoundError("No valid agents found in the conversation") - + raise AgentNotFoundError( + "No valid agents found in the conversation" + ) + # Randomly select exactly one agent to respond random_agent = random.choice(valid_agents) logger.info(f"Random speaker selected: {random_agent}") - + # Get response from the randomly selected agent self._get_agent_response(random_agent, img, imgs) @@ -1015,7 +1021,7 @@ Remember: You are part of a team. Your response should reflect that you've read, # Use the specialized function for random_speaker self._process_random_speaker( mentioned_agents, img, imgs - ) + ) else: self._process_static_speakers( mentioned_agents, img, imgs