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.
25 lines
420 B
25 lines
420 B
from swarms.agents.simple_agent import SimpleAgent
|
|
from swarms.structs import Flow
|
|
from swarms.models import OpenAIChat
|
|
|
|
api_key = ""
|
|
|
|
llm = OpenAIChat(
|
|
openai_api_key=api_key,
|
|
temperature=0.5,
|
|
)
|
|
|
|
# Initialize the flow
|
|
flow = Flow(
|
|
llm=llm,
|
|
max_loops=5,
|
|
)
|
|
|
|
|
|
agent = SimpleAgent(
|
|
name="Optimus Prime",
|
|
flow=flow,
|
|
)
|
|
|
|
out = agent.run("Generate a 10,000 word blog on health and wellness.")
|
|
print(out) |