|
|
|
@ -117,11 +117,16 @@ Here's an example of how to use the `AgentRearrange` class and the `rearrange` f
|
|
|
|
|
from swarms import Agent, AgentRearrange, rearrange
|
|
|
|
|
from typing import List
|
|
|
|
|
|
|
|
|
|
llm = Anthropic(
|
|
|
|
|
temperature=0.1,
|
|
|
|
|
anthropic_api_key = anthropic_api_key
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Initialize the director agent
|
|
|
|
|
director = Agent(
|
|
|
|
|
agent_name="Director",
|
|
|
|
|
system_prompt="Directs the tasks for the workers",
|
|
|
|
|
llm=Anthropic(),
|
|
|
|
|
llm=llm,
|
|
|
|
|
max_loops=1,
|
|
|
|
|
dashboard=False,
|
|
|
|
|
streaming_on=True,
|
|
|
|
@ -135,7 +140,7 @@ director = Agent(
|
|
|
|
|
worker1 = Agent(
|
|
|
|
|
agent_name="Worker1",
|
|
|
|
|
system_prompt="Generates a transcript for a youtube video on what swarms are",
|
|
|
|
|
llm=Anthropic(),
|
|
|
|
|
llm=llm,
|
|
|
|
|
max_loops=1,
|
|
|
|
|
dashboard=False,
|
|
|
|
|
streaming_on=True,
|
|
|
|
@ -149,7 +154,7 @@ worker1 = Agent(
|
|
|
|
|
worker2 = Agent(
|
|
|
|
|
agent_name="Worker2",
|
|
|
|
|
system_prompt="Summarizes the transcript generated by Worker1",
|
|
|
|
|
llm=Anthropic(),
|
|
|
|
|
llm=llm,
|
|
|
|
|
max_loops=1,
|
|
|
|
|
dashboard=False,
|
|
|
|
|
streaming_on=True,
|
|
|
|
|