forked from kyegomez/swarms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
27 lines (24 loc) · 691 Bytes
/
Copy pathexample.py
File metadata and controls
27 lines (24 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from swarms import Agent, OpenAIChat
# Initialize the agent
agent = Agent(
agent_name="Transcript Generator",
system_prompt="Generate a transcript for a youtube video on what swarms are!",
agent_description=(
"Generate a transcript for a youtube video on what swarms" " are!"
),
llm=OpenAIChat(),
max_loops="auto",
autosave=True,
dashboard=False,
streaming_on=True,
verbose=True,
stopping_token="<DONE>",
interactive=True,
state_save_file_type="json",
saved_state_path="transcript_generator.json",
)
# Run the Agent on a task
out = agent.run(
"Generate a transcript for a youtube video on what swarms are!"
)
print(out)