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.
30 lines
568 B
30 lines
568 B
10 months ago
|
from swarms import Agent
|
||
|
from swarms.models.base_llm import AbstractLLM
|
||
|
|
||
|
|
||
|
class ExampleLLM(AbstractLLM):
|
||
|
def __init__():
|
||
|
pass
|
||
|
|
||
|
def run(self, task: str, *args, **kwargs):
|
||
|
pass
|
||
|
|
||
|
|
||
|
## Initialize the workflow
|
||
|
agent = Agent(
|
||
|
llm=ExampleLLM(),
|
||
|
max_loops="auto",
|
||
|
autosave=True,
|
||
|
dashboard=False,
|
||
|
streaming_on=True,
|
||
|
verbose=True,
|
||
|
stopping_token="<DONE>",
|
||
|
interactive=True,
|
||
|
)
|
||
|
|
||
|
# Run the workflow on a task
|
||
|
agent(
|
||
|
"Generate a transcript for a youtube video on what swarms are!"
|
||
|
" Output a <DONE> token when done."
|
||
|
)
|