diff --git a/examples/multi-worker/ui-worker/async-tasks/bot.py b/examples/multi-worker/ui-worker/async-tasks/bot.py index dc71113bc..513686b32 100644 --- a/examples/multi-worker/ui-worker/async-tasks/bot.py +++ b/examples/multi-worker/ui-worker/async-tasks/bot.py @@ -357,11 +357,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Client disconnected") await runner.cancel() - await runner.launch_worker(ResearchWorker()) - await runner.launch_worker(WikipediaResearcher("wikipedia")) - await runner.launch_worker(NewsResearcher("news")) - await runner.launch_worker(ScholarResearcher("scholar")) - await runner.launch_worker(worker) + await runner.add_workers( + ResearchWorker(), + WikipediaResearcher("wikipedia"), + NewsResearcher("news"), + ScholarResearcher("scholar"), + worker, + ) await runner.run() diff --git a/examples/multi-worker/ui-worker/deixis/bot.py b/examples/multi-worker/ui-worker/deixis/bot.py index 947fdd5a7..d7718a06b 100644 --- a/examples/multi-worker/ui-worker/deixis/bot.py +++ b/examples/multi-worker/ui-worker/deixis/bot.py @@ -273,8 +273,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Client disconnected") await runner.cancel() - await runner.launch_worker(DeixisWorker()) - await runner.launch_worker(worker) + await runner.add_workers(DeixisWorker(), worker) await runner.run() diff --git a/examples/multi-worker/ui-worker/document-review/bot.py b/examples/multi-worker/ui-worker/document-review/bot.py index 74d1e4069..15b63ce86 100644 --- a/examples/multi-worker/ui-worker/document-review/bot.py +++ b/examples/multi-worker/ui-worker/document-review/bot.py @@ -489,10 +489,12 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Client disconnected") await runner.cancel() - await runner.launch_worker(ReviewWorker()) - await runner.launch_worker(ClarityReviewer("clarity")) - await runner.launch_worker(ToneReviewer("tone")) - await runner.launch_worker(worker) + await runner.add_workers( + ReviewWorker(), + ClarityReviewer("clarity"), + ToneReviewer("tone"), + worker, + ) await runner.run() diff --git a/examples/multi-worker/ui-worker/form-fill/bot.py b/examples/multi-worker/ui-worker/form-fill/bot.py index 618a29a46..2f99be338 100644 --- a/examples/multi-worker/ui-worker/form-fill/bot.py +++ b/examples/multi-worker/ui-worker/form-fill/bot.py @@ -260,8 +260,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Client disconnected") await runner.cancel() - await runner.launch_worker(FormWorker()) - await runner.launch_worker(worker) + await runner.add_workers(FormWorker(), worker) await runner.run() diff --git a/examples/multi-worker/ui-worker/hello-snapshot/bot.py b/examples/multi-worker/ui-worker/hello-snapshot/bot.py index 93b7aa018..86f6e76b6 100644 --- a/examples/multi-worker/ui-worker/hello-snapshot/bot.py +++ b/examples/multi-worker/ui-worker/hello-snapshot/bot.py @@ -256,8 +256,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Client disconnected") await runner.cancel() - await runner.launch_worker(HelloWorker()) - await runner.launch_worker(worker) + await runner.add_workers(HelloWorker(), worker) await runner.run() diff --git a/examples/multi-worker/ui-worker/pointing/bot.py b/examples/multi-worker/ui-worker/pointing/bot.py index 23b2d8154..e809bd4c1 100644 --- a/examples/multi-worker/ui-worker/pointing/bot.py +++ b/examples/multi-worker/ui-worker/pointing/bot.py @@ -256,8 +256,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Client disconnected") await runner.cancel() - await runner.launch_worker(PointingWorker()) - await runner.launch_worker(worker) + await runner.add_workers(PointingWorker(), worker) await runner.run() diff --git a/examples/multi-worker/ui-worker/shopping-list/bot.py b/examples/multi-worker/ui-worker/shopping-list/bot.py index 067fa4479..82ed69c80 100644 --- a/examples/multi-worker/ui-worker/shopping-list/bot.py +++ b/examples/multi-worker/ui-worker/shopping-list/bot.py @@ -307,8 +307,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Client disconnected") await runner.cancel() - await runner.launch_worker(ListWorker()) - await runner.launch_worker(worker) + await runner.add_workers(ListWorker(), worker) await runner.run()