You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
834 B
37 lines
834 B
from swarms import Agent, SwarmRouter
|
|
|
|
|
|
agents = [
|
|
Agent(
|
|
agent_name="test_agent_1",
|
|
agent_description="test_agent_1_description",
|
|
system_prompt="test_agent_1_system_prompt",
|
|
model_name="gpt-4o",
|
|
),
|
|
Agent(
|
|
agent_name="test_agent_2",
|
|
agent_description="test_agent_2_description",
|
|
system_prompt="test_agent_2_system_prompt",
|
|
model_name="gpt-4o",
|
|
),
|
|
Agent(
|
|
agent_name="test_agent_3",
|
|
agent_description="test_agent_3_description",
|
|
system_prompt="test_agent_3_system_prompt",
|
|
model_name="gpt-4o",
|
|
),
|
|
]
|
|
|
|
router = SwarmRouter(
|
|
agents=agents,
|
|
swarm_type="SequentialWorkflow",
|
|
output_type="dict",
|
|
return_entire_history=False,
|
|
)
|
|
|
|
output = router.run("How are you doing?")
|
|
|
|
print(output)
|
|
|
|
print(type(output))
|