From dc0c7370b1396b9319fca0c38d7c01afd0f1640c Mon Sep 17 00:00:00 2001 From: ascender1729 Date: Thu, 1 May 2025 19:07:47 +0530 Subject: [PATCH] docs: update concurrent agents API reference with correct imports and example --- docs/swarms/structs/various_execution_methods.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/swarms/structs/various_execution_methods.md b/docs/swarms/structs/various_execution_methods.md index 5658aa3e..f9d2981d 100644 --- a/docs/swarms/structs/various_execution_methods.md +++ b/docs/swarms/structs/various_execution_methods.md @@ -91,20 +91,19 @@ Runs multiple agents concurrently with timeout limits. ## Usage Examples ```python -from swarms import Agent, run_agents_concurrently, run_agents_with_timeout, run_agents_with_different_tasks -from swarm_models import OpenAIChat - -model = OpenAIChat( - model_name="gpt-4o-mini", - temperature=0.0 +from swarms.structs.agent import Agent +from swarms.structs.multi_agent_exec import ( + run_agents_concurrently, + run_agents_with_timeout, + run_agents_with_different_tasks ) -# Initialize agents +# Initialize agents using only the built-in model_name parameter agents = [ Agent( agent_name=f"Analysis-Agent-{i}", system_prompt="You are a financial analysis expert", - llm=model, + model_name="gpt-4o-mini", max_loops=1 ) for i in range(5)