-
-
Notifications
You must be signed in to change notification settings - Fork 538
/
Copy pathreasoning_agent_router.py
24 lines (20 loc) · 1.08 KB
/
reasoning_agent_router.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from swarms.agents.reasoning_agents import ReasoningAgentRouter
reasoning_agent_router = ReasoningAgentRouter(
agent_name="reasoning-agent",
description="A reasoning agent that can answer questions and help with tasks.",
model_name="gpt-4o-mini",
system_prompt="You are a helpful assistant that can answer questions and help with tasks.",
max_loops=1,
swarm_type="self-consistency",
num_samples=1,
output_type="list",
)
reasoning_agent_router.run(
"What is the best possible financial strategy to maximize returns but minimize risk? Give a list of etfs to invest in and the percentage of the portfolio to allocate to each etf."
)
# reasoning_agent_router.batched_run(
# [
# "What is the best possible financial strategy to maximize returns but minimize risk? Give a list of etfs to invest in and the percentage of the portfolio to allocate to each etf.",
# "What is the best possible financial strategy to maximize returns but minimize risk? Give a list of etfs to invest in and the percentage of the portfolio to allocate to each etf.",
# ]
# )