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.
swarms/example.py

32 lines
942 B

2 months ago
from swarms import Agent
from swarms.prompts.finance_agent_sys_prompt import (
FINANCIAL_AGENT_SYS_PROMPT,
)
4 months ago
5 months ago
# Initialize the agent
agent = Agent(
4 months ago
agent_name="Financial-Analysis-Agent",
2 months ago
system_prompt=FINANCIAL_AGENT_SYS_PROMPT,
1 month ago
model_name="gpt-4o-mini",
2 months ago
max_loops=1,
5 months ago
autosave=True,
dashboard=False,
verbose=True,
dynamic_temperature_enabled=True,
saved_state_path="finance_agent.json",
user_name="swarms_corp",
retry_attempts=1,
2 months ago
streaming_on=True,
5 months ago
context_length=200000,
1 month ago
return_step_meta=False,
output_type="str", # "json", "dict", "csv" OR "string" soon "yaml" and
2 months ago
auto_generate_prompt=False, # Auto generate prompt for the agent based on name, description, and system prompt, task
2 months ago
max_tokens=8000,
5 months ago
)
2 months ago
agent.run(
"How can I establish a ROTH IRA to buy stocks and get a tax break? What are the criteria. Create a report on this question.",
all_cores=True,
5 months ago
)