docs: update concurrent agents API reference with correct imports and example

pull/830/head
ascender1729 1 week ago
parent e7391ff6e1
commit dc0c7370b1

@ -91,20 +91,19 @@ Runs multiple agents concurrently with timeout limits.
## Usage Examples ## Usage Examples
```python ```python
from swarms import Agent, run_agents_concurrently, run_agents_with_timeout, run_agents_with_different_tasks from swarms.structs.agent import Agent
from swarm_models import OpenAIChat from swarms.structs.multi_agent_exec import (
run_agents_concurrently,
model = OpenAIChat( run_agents_with_timeout,
model_name="gpt-4o-mini", run_agents_with_different_tasks
temperature=0.0
) )
# Initialize agents # Initialize agents using only the built-in model_name parameter
agents = [ agents = [
Agent( Agent(
agent_name=f"Analysis-Agent-{i}", agent_name=f"Analysis-Agent-{i}",
system_prompt="You are a financial analysis expert", system_prompt="You are a financial analysis expert",
llm=model, model_name="gpt-4o-mini",
max_loops=1 max_loops=1
) )
for i in range(5) for i in range(5)

Loading…
Cancel
Save