parent
e72d7a7ae3
commit
cf26ebdb2b
@ -0,0 +1,14 @@
|
||||
from swarms import Worker, Orchestrator
|
||||
|
||||
node = Worker(
|
||||
openai_api_key="",
|
||||
ai_name="Optimus Prime",
|
||||
|
||||
)
|
||||
|
||||
|
||||
# Instantiate the Orchestrator with 10 agents
|
||||
orchestrator = Orchestrator(node, agent_list=[node]*10, task_queue=[])
|
||||
|
||||
# Agent 7 sends a message to Agent 9
|
||||
orchestrator.chat(sender_id=7, receiver_id=9, message="Can you help me with this task?")
|
@ -1,6 +1,11 @@
|
||||
from swarms.structs.workflow import Workflow
|
||||
|
||||
workflow = Workflow()
|
||||
from swarms import Workflow
|
||||
from swarms.tools.autogpt import ChatOpenAI
|
||||
|
||||
workflow.add('Find 50 ceos in linkedin in agriculture ')
|
||||
workflow = Workflow(ChatOpenAI)
|
||||
|
||||
workflow.add("What's the weather in miami")
|
||||
workflow.add("Provide details for {{ parent_output }}")
|
||||
workflow.add("Summarize the above information: {{ parent_output}}")
|
||||
|
||||
workflow.run()
|
||||
|
Loading…
Reference in new issue