orchestrate

pull/55/head
Kye 2 years ago
parent 6f4d449e02
commit 93f2cb58d3

@ -70,6 +70,24 @@ class Orchestrator:
(Task Assignment) (Task Completion) (Task Assignment) (Task Completion)
###Usage
```
from exa import Orchestrator
# Instantiate the Orchestrator with 10 agents
orchestrator = Orchestrator(llm, agent_list=[llm]*10, task_queue=[])
# Add tasks to the Orchestrator
tasks = [{"content": f"Write a short story about a {animal}."} for animal in ["cat", "dog", "bird", "fish", "lion", "tiger", "elephant", "giraffe", "monkey", "zebra"]]
orchestrator.assign_tasks(tasks)
# Run the Orchestrator
orchestrator.run()
# Retrieve the results
for task in tasks:
print(orchestrator.retrieve_result(id(task)))
```
"""
def __init__(
self,

Loading…
Cancel
Save