Skip to content

Commit

Permalink
oMerge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
dongyuanjushi committed Mar 28, 2024
2 parents a7ed3a9 + d47e9d5 commit d487521
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ def main():

llm = llms.LLMKernel(llm_name, max_gpu_memory, max_new_tokens)

# start the scheduler
scheduler = FIFOScheduler(llm)

scheduler.start()

# assign maximum number of agents that can run in parallel
agent_thread_pool = ThreadPoolExecutor(max_workers=64)

# construct agents
math_agent = MathAgent(
agent_name = "MathAgent",
task_input = "Solve the problem that Albert is wondering how much pizza he can eat in one day. He buys 2 large pizzas and 2 small pizzas. A large pizza has 16 slices and a small pizza has 8 slices. If he eats it all, how many pieces does he eat that day?",
Expand All @@ -73,6 +74,7 @@ def main():

agents = [math_agent, narrative_agent, rec_agent]

# run agents concurrently
tasks = [agent_thread_pool.submit(agent.run) for agent in agents]

for r in as_completed(tasks):
Expand Down

0 comments on commit d487521

Please sign in to comment.