diff --git a/changelog/4493.deprecated.md b/changelog/4493.deprecated.md new file mode 100644 index 000000000..121cd562c --- /dev/null +++ b/changelog/4493.deprecated.md @@ -0,0 +1 @@ +- Passing a worker to `PipelineRunner.run()` is deprecated. Register the worker with `PipelineRunner.add_workers()` before calling `run()` instead; `run()` now blocks until `end()` / `cancel()` is called rather than until the passed worker finishes. The `worker` argument still works but emits a `DeprecationWarning` and will be removed in a future release. diff --git a/examples/audio/audio-bot-background-sound.py b/examples/audio/audio-bot-background-sound.py index 9bca91814..5df0859e3 100644 --- a/examples/audio/audio-bot-background-sound.py +++ b/examples/audio/audio-bot-background-sound.py @@ -140,7 +140,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/audio/audio-recording.py b/examples/audio/audio-recording.py index b23632bf8..379341c42 100644 --- a/examples/audio/audio-recording.py +++ b/examples/audio/audio-recording.py @@ -191,7 +191,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await save_audio_file(bot_audio, bot_filename, sample_rate, 1) runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/audio/audio-sound-effects.py b/examples/audio/audio-sound-effects.py index f83930214..a77997d12 100644 --- a/examples/audio/audio-sound-effects.py +++ b/examples/audio/audio-sound-effects.py @@ -163,7 +163,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/context-summarization/context-summarization-dedicated-llm.py b/examples/context-summarization/context-summarization-dedicated-llm.py index c4796d316..086becc07 100644 --- a/examples/context-summarization/context-summarization-dedicated-llm.py +++ b/examples/context-summarization/context-summarization-dedicated-llm.py @@ -223,7 +223,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/context-summarization/context-summarization-google.py b/examples/context-summarization/context-summarization-google.py index 6221f8281..55b3b3880 100644 --- a/examples/context-summarization/context-summarization-google.py +++ b/examples/context-summarization/context-summarization-google.py @@ -184,7 +184,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/context-summarization/context-summarization-manual-openai.py b/examples/context-summarization/context-summarization-manual-openai.py index 16d830685..d196618a0 100644 --- a/examples/context-summarization/context-summarization-manual-openai.py +++ b/examples/context-summarization/context-summarization-manual-openai.py @@ -158,7 +158,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/context-summarization/context-summarization-openai.py b/examples/context-summarization/context-summarization-openai.py index f84da9691..fc08246ca 100644 --- a/examples/context-summarization/context-summarization-openai.py +++ b/examples/context-summarization/context-summarization-openai.py @@ -184,7 +184,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-add-tool-change-messages.py b/examples/features/features-add-tool-change-messages.py index c7f460f57..680737035 100644 --- a/examples/features/features-add-tool-change-messages.py +++ b/examples/features/features-add-tool-change-messages.py @@ -217,7 +217,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-app-resources.py b/examples/features/features-app-resources.py index c5e21d42c..955acea9e 100644 --- a/examples/features/features-app-resources.py +++ b/examples/features/features-app-resources.py @@ -308,7 +308,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() # The session has ended; read whatever state the handlers built up. logger.info(f"Tool calls logged during session:\n{tool_call_logger.dump()}") diff --git a/examples/features/features-before-and-after-events.py b/examples/features/features-before-and-after-events.py index 5cf89afdf..b6f0a3e39 100644 --- a/examples/features/features-before-and-after-events.py +++ b/examples/features/features-before-and-after-events.py @@ -135,7 +135,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-concurrent-llm-evaluation.py b/examples/features/features-concurrent-llm-evaluation.py index a7baba9c6..11692be5a 100644 --- a/examples/features/features-concurrent-llm-evaluation.py +++ b/examples/features/features-concurrent-llm-evaluation.py @@ -158,7 +158,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-concurrent-llm-rtvi-ignored-sources.py b/examples/features/features-concurrent-llm-rtvi-ignored-sources.py index 4a4effd6c..f8fa9ba68 100644 --- a/examples/features/features-concurrent-llm-rtvi-ignored-sources.py +++ b/examples/features/features-concurrent-llm-rtvi-ignored-sources.py @@ -169,7 +169,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-custom-frame-processor.py b/examples/features/features-custom-frame-processor.py index b3712a372..f6320bb1d 100644 --- a/examples/features/features-custom-frame-processor.py +++ b/examples/features/features-custom-frame-processor.py @@ -153,7 +153,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-gpu-container-local-bot.py b/examples/features/features-gpu-container-local-bot.py index 40840fe92..2d6556cdc 100644 --- a/examples/features/features-gpu-container-local-bot.py +++ b/examples/features/features-gpu-container-local-bot.py @@ -150,7 +150,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-live-translation.py b/examples/features/features-live-translation.py index 2adbe3b64..bfd068dd9 100644 --- a/examples/features/features-live-translation.py +++ b/examples/features/features-live-translation.py @@ -127,7 +127,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-pattern-pair-voice-switching.py b/examples/features/features-pattern-pair-voice-switching.py index aab61faf5..9dbf4c1a1 100644 --- a/examples/features/features-pattern-pair-voice-switching.py +++ b/examples/features/features-pattern-pair-voice-switching.py @@ -237,7 +237,8 @@ Remember: Use narrator voice for EVERYTHING except the actual quoted dialogue."" await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-service-switcher.py b/examples/features/features-service-switcher.py index b7f6c14b7..b135a2600 100644 --- a/examples/features/features-service-switcher.py +++ b/examples/features/features-service-switcher.py @@ -185,7 +185,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-switch-languages.py b/examples/features/features-switch-languages.py index b63b1084f..4442d3f38 100644 --- a/examples/features/features-switch-languages.py +++ b/examples/features/features-switch-languages.py @@ -175,7 +175,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-switch-voices.py b/examples/features/features-switch-voices.py index c86151a07..7dbb72e30 100644 --- a/examples/features/features-switch-voices.py +++ b/examples/features/features-switch-voices.py @@ -185,7 +185,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-user-email-gathering.py b/examples/features/features-user-email-gathering.py index d989c7ddd..b357b543d 100644 --- a/examples/features/features-user-email-gathering.py +++ b/examples/features/features-user-email-gathering.py @@ -146,7 +146,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-voicemail-detection.py b/examples/features/features-voicemail-detection.py index c59042066..7d0beb1de 100644 --- a/examples/features/features-voicemail-detection.py +++ b/examples/features/features-voicemail-detection.py @@ -130,7 +130,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/features/features-wake-phrase.py b/examples/features/features-wake-phrase.py index a7e77bad7..6d37857ff 100644 --- a/examples/features/features-wake-phrase.py +++ b/examples/features/features-wake-phrase.py @@ -132,7 +132,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-anthropic-async-stream.py b/examples/function-calling/function-calling-anthropic-async-stream.py index fc5b0327e..deeb2d913 100644 --- a/examples/function-calling/function-calling-anthropic-async-stream.py +++ b/examples/function-calling/function-calling-anthropic-async-stream.py @@ -195,7 +195,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-anthropic-async.py b/examples/function-calling/function-calling-anthropic-async.py index a82abc2cb..ffbc316b1 100644 --- a/examples/function-calling/function-calling-anthropic-async.py +++ b/examples/function-calling/function-calling-anthropic-async.py @@ -165,7 +165,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-anthropic-video.py b/examples/function-calling/function-calling-anthropic-video.py index fb96a985e..9f2cd2723 100644 --- a/examples/function-calling/function-calling-anthropic-video.py +++ b/examples/function-calling/function-calling-anthropic-video.py @@ -177,7 +177,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-anthropic.py b/examples/function-calling/function-calling-anthropic.py index efd0f6f77..2bfad95c0 100644 --- a/examples/function-calling/function-calling-anthropic.py +++ b/examples/function-calling/function-calling-anthropic.py @@ -150,7 +150,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-aws-video.py b/examples/function-calling/function-calling-aws-video.py index 2a92b70c2..210e8df03 100644 --- a/examples/function-calling/function-calling-aws-video.py +++ b/examples/function-calling/function-calling-aws-video.py @@ -182,7 +182,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-aws.py b/examples/function-calling/function-calling-aws.py index abb853180..efcc241c3 100644 --- a/examples/function-calling/function-calling-aws.py +++ b/examples/function-calling/function-calling-aws.py @@ -159,7 +159,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-azure.py b/examples/function-calling/function-calling-azure.py index d6f3305cb..4fa761dfb 100644 --- a/examples/function-calling/function-calling-azure.py +++ b/examples/function-calling/function-calling-azure.py @@ -142,7 +142,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-cerebras.py b/examples/function-calling/function-calling-cerebras.py index 2bde84d92..5904bc72f 100644 --- a/examples/function-calling/function-calling-cerebras.py +++ b/examples/function-calling/function-calling-cerebras.py @@ -151,7 +151,8 @@ Start by asking me for my location. Then, use 'get_weather_current' to give me a runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-deepseek.py b/examples/function-calling/function-calling-deepseek.py index 232116c22..066d4aef7 100644 --- a/examples/function-calling/function-calling-deepseek.py +++ b/examples/function-calling/function-calling-deepseek.py @@ -152,7 +152,8 @@ Start by asking me for my location. Then, use 'get_weather_current' to give me a runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-direct.py b/examples/function-calling/function-calling-direct.py index fafae9ab7..613cf47de 100644 --- a/examples/function-calling/function-calling-direct.py +++ b/examples/function-calling/function-calling-direct.py @@ -143,7 +143,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-fireworks.py b/examples/function-calling/function-calling-fireworks.py index bfbd35c88..ed04c55d6 100644 --- a/examples/function-calling/function-calling-fireworks.py +++ b/examples/function-calling/function-calling-fireworks.py @@ -148,7 +148,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-google-async-stream.py b/examples/function-calling/function-calling-google-async-stream.py index 0819580ce..8a179ae76 100644 --- a/examples/function-calling/function-calling-google-async-stream.py +++ b/examples/function-calling/function-calling-google-async-stream.py @@ -199,7 +199,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-google-async.py b/examples/function-calling/function-calling-google-async.py index c7ff23d14..4f7cb467c 100644 --- a/examples/function-calling/function-calling-google-async.py +++ b/examples/function-calling/function-calling-google-async.py @@ -241,7 +241,8 @@ indicate you should use the get_image tool are: runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-google-vertex.py b/examples/function-calling/function-calling-google-vertex.py index bf65628c1..162648bec 100644 --- a/examples/function-calling/function-calling-google-vertex.py +++ b/examples/function-calling/function-calling-google-vertex.py @@ -149,7 +149,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-google-video.py b/examples/function-calling/function-calling-google-video.py index 069176903..ec50a2a18 100644 --- a/examples/function-calling/function-calling-google-video.py +++ b/examples/function-calling/function-calling-google-video.py @@ -177,7 +177,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-google.py b/examples/function-calling/function-calling-google.py index d610ce1af..07c29c2ca 100644 --- a/examples/function-calling/function-calling-google.py +++ b/examples/function-calling/function-calling-google.py @@ -233,7 +233,8 @@ indicate you should use the get_image tool are: runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-grok.py b/examples/function-calling/function-calling-grok.py index 6b82822dd..3795005ef 100644 --- a/examples/function-calling/function-calling-grok.py +++ b/examples/function-calling/function-calling-grok.py @@ -142,7 +142,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-groq.py b/examples/function-calling/function-calling-groq.py index 2e2a71897..711cf84ec 100644 --- a/examples/function-calling/function-calling-groq.py +++ b/examples/function-calling/function-calling-groq.py @@ -140,7 +140,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-inception.py b/examples/function-calling/function-calling-inception.py index 416e39a25..370f41344 100644 --- a/examples/function-calling/function-calling-inception.py +++ b/examples/function-calling/function-calling-inception.py @@ -162,7 +162,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(task) + await runner.add_workers(task) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-missing-handler.py b/examples/function-calling/function-calling-missing-handler.py index 2f4f69f1f..375714806 100644 --- a/examples/function-calling/function-calling-missing-handler.py +++ b/examples/function-calling/function-calling-missing-handler.py @@ -172,7 +172,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-mistral.py b/examples/function-calling/function-calling-mistral.py index 9fb38d537..cf8e9b088 100644 --- a/examples/function-calling/function-calling-mistral.py +++ b/examples/function-calling/function-calling-mistral.py @@ -153,7 +153,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-moondream-video.py b/examples/function-calling/function-calling-moondream-video.py index 4f5b5501c..65bd404f5 100644 --- a/examples/function-calling/function-calling-moondream-video.py +++ b/examples/function-calling/function-calling-moondream-video.py @@ -215,7 +215,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-nebius.py b/examples/function-calling/function-calling-nebius.py index c310ca0ea..644119a06 100644 --- a/examples/function-calling/function-calling-nebius.py +++ b/examples/function-calling/function-calling-nebius.py @@ -160,7 +160,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-novita.py b/examples/function-calling/function-calling-novita.py index 8c4cde870..3858c5f1c 100644 --- a/examples/function-calling/function-calling-novita.py +++ b/examples/function-calling/function-calling-novita.py @@ -158,7 +158,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-nvidia.py b/examples/function-calling/function-calling-nvidia.py index 157f6485c..da4fc6e0d 100644 --- a/examples/function-calling/function-calling-nvidia.py +++ b/examples/function-calling/function-calling-nvidia.py @@ -144,7 +144,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-ollama.py b/examples/function-calling/function-calling-ollama.py index 6a4a175e9..10c146355 100644 --- a/examples/function-calling/function-calling-ollama.py +++ b/examples/function-calling/function-calling-ollama.py @@ -158,7 +158,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openai-async-stream.py b/examples/function-calling/function-calling-openai-async-stream.py index 7b9c9d9b3..51a15f0a0 100644 --- a/examples/function-calling/function-calling-openai-async-stream.py +++ b/examples/function-calling/function-calling-openai-async-stream.py @@ -199,7 +199,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openai-async.py b/examples/function-calling/function-calling-openai-async.py index 67cc55a3c..f185a2ae7 100644 --- a/examples/function-calling/function-calling-openai-async.py +++ b/examples/function-calling/function-calling-openai-async.py @@ -177,7 +177,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openai-responses-async-stream.py b/examples/function-calling/function-calling-openai-responses-async-stream.py index f88e6ceb9..0b8b2541b 100644 --- a/examples/function-calling/function-calling-openai-responses-async-stream.py +++ b/examples/function-calling/function-calling-openai-responses-async-stream.py @@ -196,7 +196,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openai-responses-async.py b/examples/function-calling/function-calling-openai-responses-async.py index 395bc89ed..7ecf07eec 100644 --- a/examples/function-calling/function-calling-openai-responses-async.py +++ b/examples/function-calling/function-calling-openai-responses-async.py @@ -182,7 +182,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openai-responses-http.py b/examples/function-calling/function-calling-openai-responses-http.py index 0ebca3433..5d57ef782 100644 --- a/examples/function-calling/function-calling-openai-responses-http.py +++ b/examples/function-calling/function-calling-openai-responses-http.py @@ -160,7 +160,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openai-responses-video-http.py b/examples/function-calling/function-calling-openai-responses-video-http.py index b600bf173..11ecde9d8 100644 --- a/examples/function-calling/function-calling-openai-responses-video-http.py +++ b/examples/function-calling/function-calling-openai-responses-video-http.py @@ -180,7 +180,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openai-responses-video.py b/examples/function-calling/function-calling-openai-responses-video.py index 358cbb774..01275b166 100644 --- a/examples/function-calling/function-calling-openai-responses-video.py +++ b/examples/function-calling/function-calling-openai-responses-video.py @@ -180,7 +180,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openai-responses.py b/examples/function-calling/function-calling-openai-responses.py index 344de7ae2..f660ab4c0 100644 --- a/examples/function-calling/function-calling-openai-responses.py +++ b/examples/function-calling/function-calling-openai-responses.py @@ -168,7 +168,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openai-video.py b/examples/function-calling/function-calling-openai-video.py index 63d0c46e8..0a6221823 100644 --- a/examples/function-calling/function-calling-openai-video.py +++ b/examples/function-calling/function-calling-openai-video.py @@ -180,7 +180,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openai.py b/examples/function-calling/function-calling-openai.py index 72f093279..c3b634065 100644 --- a/examples/function-calling/function-calling-openai.py +++ b/examples/function-calling/function-calling-openai.py @@ -157,7 +157,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-openrouter.py b/examples/function-calling/function-calling-openrouter.py index ddb5a88a8..2bd855bfb 100644 --- a/examples/function-calling/function-calling-openrouter.py +++ b/examples/function-calling/function-calling-openrouter.py @@ -145,7 +145,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-perplexity.py b/examples/function-calling/function-calling-perplexity.py index 345ef1df4..b249badae 100644 --- a/examples/function-calling/function-calling-perplexity.py +++ b/examples/function-calling/function-calling-perplexity.py @@ -117,7 +117,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-qwen.py b/examples/function-calling/function-calling-qwen.py index c11c902da..dbbf361cb 100644 --- a/examples/function-calling/function-calling-qwen.py +++ b/examples/function-calling/function-calling-qwen.py @@ -143,7 +143,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-sambanova.py b/examples/function-calling/function-calling-sambanova.py index 098c84c43..62f2642d3 100644 --- a/examples/function-calling/function-calling-sambanova.py +++ b/examples/function-calling/function-calling-sambanova.py @@ -142,7 +142,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-sarvam.py b/examples/function-calling/function-calling-sarvam.py index c5cc9e489..2bea6a68d 100644 --- a/examples/function-calling/function-calling-sarvam.py +++ b/examples/function-calling/function-calling-sarvam.py @@ -165,7 +165,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/function-calling/function-calling-together.py b/examples/function-calling/function-calling-together.py index 42df074aa..81cd8bb63 100644 --- a/examples/function-calling/function-calling-together.py +++ b/examples/function-calling/function-calling-together.py @@ -143,7 +143,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/getting-started/01-say-one-thing.py b/examples/getting-started/01-say-one-thing.py index 774bfa1de..a5932b856 100644 --- a/examples/getting-started/01-say-one-thing.py +++ b/examples/getting-started/01-say-one-thing.py @@ -54,7 +54,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/getting-started/01a-local-audio.py b/examples/getting-started/01a-local-audio.py index 1355998cb..1d133bafa 100644 --- a/examples/getting-started/01a-local-audio.py +++ b/examples/getting-started/01a-local-audio.py @@ -44,7 +44,8 @@ async def main(): runner = PipelineRunner(handle_sigint=False if sys.platform == "win32" else True) - await asyncio.gather(runner.run(worker), say_something()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), say_something()) if __name__ == "__main__": diff --git a/examples/getting-started/02-llm-say-one-thing.py b/examples/getting-started/02-llm-say-one-thing.py index d65965cad..92318e00d 100644 --- a/examples/getting-started/02-llm-say-one-thing.py +++ b/examples/getting-started/02-llm-say-one-thing.py @@ -65,7 +65,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/getting-started/03-still-frame.py b/examples/getting-started/03-still-frame.py index f90fde3f7..c64ce3fc0 100644 --- a/examples/getting-started/03-still-frame.py +++ b/examples/getting-started/03-still-frame.py @@ -68,7 +68,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/getting-started/03a-local-still-frame.py b/examples/getting-started/03a-local-still-frame.py index ef1302713..8ddfab8c7 100644 --- a/examples/getting-started/03a-local-still-frame.py +++ b/examples/getting-started/03a-local-still-frame.py @@ -57,7 +57,8 @@ async def main(): tk_root.update_idletasks() await asyncio.sleep(0.1) - await asyncio.gather(runner.run(worker), run_tk()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), run_tk()) if __name__ == "__main__": diff --git a/examples/getting-started/04-sync-speech-and-image.py b/examples/getting-started/04-sync-speech-and-image.py index 96630a6b3..f41af8fa7 100644 --- a/examples/getting-started/04-sync-speech-and-image.py +++ b/examples/getting-started/04-sync-speech-and-image.py @@ -205,7 +205,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Run the pipeline runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/getting-started/05-speaking-state.py b/examples/getting-started/05-speaking-state.py index 58a098fc1..de754b701 100644 --- a/examples/getting-started/05-speaking-state.py +++ b/examples/getting-started/05-speaking-state.py @@ -157,7 +157,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/getting-started/06-voice-agent.py b/examples/getting-started/06-voice-agent.py index 4031675f5..c2da11d23 100644 --- a/examples/getting-started/06-voice-agent.py +++ b/examples/getting-started/06-voice-agent.py @@ -110,7 +110,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/getting-started/06a-voice-agent-local.py b/examples/getting-started/06a-voice-agent-local.py index 08d2c3ce7..5dfc617de 100644 --- a/examples/getting-started/06a-voice-agent-local.py +++ b/examples/getting-started/06a-voice-agent-local.py @@ -87,7 +87,8 @@ async def main(): runner = PipelineRunner() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/getting-started/07-function-calling.py b/examples/getting-started/07-function-calling.py index 0e9b4c00c..ec11aad52 100644 --- a/examples/getting-started/07-function-calling.py +++ b/examples/getting-started/07-function-calling.py @@ -160,7 +160,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/mcp/mcp-multiple-mcp.py b/examples/mcp/mcp-multiple-mcp.py index c64d54db7..b5235cb5c 100644 --- a/examples/mcp/mcp-multiple-mcp.py +++ b/examples/mcp/mcp-multiple-mcp.py @@ -152,7 +152,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/mcp/mcp-stdio.py b/examples/mcp/mcp-stdio.py index 235f9e1e8..2e2274d81 100644 --- a/examples/mcp/mcp-stdio.py +++ b/examples/mcp/mcp-stdio.py @@ -130,7 +130,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/mcp/mcp-streamable-http-gemini-live.py b/examples/mcp/mcp-streamable-http-gemini-live.py index 51b8dab92..566a9788e 100644 --- a/examples/mcp/mcp-streamable-http-gemini-live.py +++ b/examples/mcp/mcp-streamable-http-gemini-live.py @@ -119,7 +119,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/mcp/mcp-streamable-http.py b/examples/mcp/mcp-streamable-http.py index 5d2572e74..3d055eb67 100644 --- a/examples/mcp/mcp-streamable-http.py +++ b/examples/mcp/mcp-streamable-http.py @@ -134,7 +134,8 @@ Just respond with short sentences when you are carrying out tool calls. runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/multi-worker/distributed-handoff/pgmq-handoff/llm.py b/examples/multi-worker/distributed-handoff/pgmq-handoff/llm.py index ae4550a1c..dc9aadd3a 100644 --- a/examples/multi-worker/distributed-handoff/pgmq-handoff/llm.py +++ b/examples/multi-worker/distributed-handoff/pgmq-handoff/llm.py @@ -175,7 +175,8 @@ async def main_async() -> None: runner = PipelineRunner(bus=bus, handle_sigint=True) logger.info(f"Starting {args.worker} worker, waiting for activation...") - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/multi-worker/distributed-handoff/pgmq-handoff/main.py b/examples/multi-worker/distributed-handoff/pgmq-handoff/main.py index d38b79c13..6b5dcbbc0 100644 --- a/examples/multi-worker/distributed-handoff/pgmq-handoff/main.py +++ b/examples/multi-worker/distributed-handoff/pgmq-handoff/main.py @@ -169,7 +169,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Client disconnected") await worker.cancel() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/multi-worker/distributed-handoff/redis-handoff/llm.py b/examples/multi-worker/distributed-handoff/redis-handoff/llm.py index 58ffde7b3..3fe570a2f 100644 --- a/examples/multi-worker/distributed-handoff/redis-handoff/llm.py +++ b/examples/multi-worker/distributed-handoff/redis-handoff/llm.py @@ -145,7 +145,8 @@ async def main_async() -> None: runner = PipelineRunner(bus=bus, handle_sigint=True) logger.info(f"Starting {args.worker} worker, waiting for activation...") - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/multi-worker/distributed-handoff/redis-handoff/main.py b/examples/multi-worker/distributed-handoff/redis-handoff/main.py index d9a64d16f..42c675103 100644 --- a/examples/multi-worker/distributed-handoff/redis-handoff/main.py +++ b/examples/multi-worker/distributed-handoff/redis-handoff/main.py @@ -150,7 +150,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): logger.info("Client disconnected") await worker.cancel() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/observability/observability-heartbeats.py b/examples/observability/observability-heartbeats.py index a7d901d04..cad566674 100644 --- a/examples/observability/observability-heartbeats.py +++ b/examples/observability/observability-heartbeats.py @@ -36,7 +36,8 @@ async def main(): runner = PipelineRunner() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/observability/observability-observer.py b/examples/observability/observability-observer.py index 6c718900a..86eb212f7 100644 --- a/examples/observability/observability-observer.py +++ b/examples/observability/observability-observer.py @@ -170,7 +170,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/observability/observability-sentry-metrics.py b/examples/observability/observability-sentry-metrics.py index 79eecff8e..ff7c5a9db 100644 --- a/examples/observability/observability-sentry-metrics.py +++ b/examples/observability/observability-sentry-metrics.py @@ -123,7 +123,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/persistent-context/persistent-context-anthropic.py b/examples/persistent-context/persistent-context-anthropic.py index 2cafb12c9..e335f8dfd 100644 --- a/examples/persistent-context/persistent-context-anthropic.py +++ b/examples/persistent-context/persistent-context-anthropic.py @@ -239,7 +239,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/persistent-context/persistent-context-aws-nova-sonic.py b/examples/persistent-context/persistent-context-aws-nova-sonic.py index 591620d47..cb87d7f90 100644 --- a/examples/persistent-context/persistent-context-aws-nova-sonic.py +++ b/examples/persistent-context/persistent-context-aws-nova-sonic.py @@ -283,7 +283,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/persistent-context/persistent-context-gemini.py b/examples/persistent-context/persistent-context-gemini.py index e4429e8fd..69c273a80 100644 --- a/examples/persistent-context/persistent-context-gemini.py +++ b/examples/persistent-context/persistent-context-gemini.py @@ -316,7 +316,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/persistent-context/persistent-context-grok-realtime.py b/examples/persistent-context/persistent-context-grok-realtime.py index 15c7c0ba8..b5fdd3ab9 100644 --- a/examples/persistent-context/persistent-context-grok-realtime.py +++ b/examples/persistent-context/persistent-context-grok-realtime.py @@ -233,7 +233,8 @@ Remember, your responses should be short - just one or two sentences usually.""" runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/persistent-context/persistent-context-openai-realtime.py b/examples/persistent-context/persistent-context-openai-realtime.py index d8c92531e..7d3773193 100644 --- a/examples/persistent-context/persistent-context-openai-realtime.py +++ b/examples/persistent-context/persistent-context-openai-realtime.py @@ -253,7 +253,8 @@ Remember, your responses should be short. Just one or two sentences, usually.""" runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/persistent-context/persistent-context-openai-responses-http.py b/examples/persistent-context/persistent-context-openai-responses-http.py index d15d8a761..968e7aef5 100644 --- a/examples/persistent-context/persistent-context-openai-responses-http.py +++ b/examples/persistent-context/persistent-context-openai-responses-http.py @@ -234,7 +234,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/persistent-context/persistent-context-openai-responses.py b/examples/persistent-context/persistent-context-openai-responses.py index 6865dde60..570a97def 100644 --- a/examples/persistent-context/persistent-context-openai-responses.py +++ b/examples/persistent-context/persistent-context-openai-responses.py @@ -234,7 +234,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/persistent-context/persistent-context-openai.py b/examples/persistent-context/persistent-context-openai.py index 0e4d52460..4ea3bebbf 100644 --- a/examples/persistent-context/persistent-context-openai.py +++ b/examples/persistent-context/persistent-context-openai.py @@ -232,7 +232,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/rag/rag-gemini-grounding-metadata.py b/examples/rag/rag-gemini-grounding-metadata.py index bab646eef..06f285cc1 100644 --- a/examples/rag/rag-gemini-grounding-metadata.py +++ b/examples/rag/rag-gemini-grounding-metadata.py @@ -160,7 +160,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/rag/rag-gemini.py b/examples/rag/rag-gemini.py index 9247eb3f0..a115b30c1 100644 --- a/examples/rag/rag-gemini.py +++ b/examples/rag/rag-gemini.py @@ -259,7 +259,8 @@ Your response will be turned into speech so use only simple words and punctuatio await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/rag/rag-mem0.py b/examples/rag/rag-mem0.py index 9e385d0c3..b853b85b3 100644 --- a/examples/rag/rag-mem0.py +++ b/examples/rag/rag-mem0.py @@ -255,7 +255,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-aws-nova-sonic-async-tool.py b/examples/realtime/realtime-aws-nova-sonic-async-tool.py index b3fcd7043..e79cbeac8 100644 --- a/examples/realtime/realtime-aws-nova-sonic-async-tool.py +++ b/examples/realtime/realtime-aws-nova-sonic-async-tool.py @@ -169,7 +169,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-aws-nova-sonic.py b/examples/realtime/realtime-aws-nova-sonic.py index f5642f65e..7c6a9db75 100644 --- a/examples/realtime/realtime-aws-nova-sonic.py +++ b/examples/realtime/realtime-aws-nova-sonic.py @@ -209,7 +209,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Run the pipeline runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-azure-async-tool.py b/examples/realtime/realtime-azure-async-tool.py index 017003527..d45853316 100644 --- a/examples/realtime/realtime-azure-async-tool.py +++ b/examples/realtime/realtime-azure-async-tool.py @@ -180,7 +180,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-azure.py b/examples/realtime/realtime-azure.py index aa5b5ed80..8ce98ce5b 100644 --- a/examples/realtime/realtime-azure.py +++ b/examples/realtime/realtime-azure.py @@ -209,7 +209,8 @@ Remember, your responses should be short. Just one or two sentences, usually. Re runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-gemini-live-async-tool.py b/examples/realtime/realtime-gemini-live-async-tool.py index 2a8a187e1..fd90bbb21 100644 --- a/examples/realtime/realtime-gemini-live-async-tool.py +++ b/examples/realtime/realtime-gemini-live-async-tool.py @@ -160,7 +160,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-gemini-live-files-api.py b/examples/realtime/realtime-gemini-live-files-api.py index bcaa9bee9..430653544 100644 --- a/examples/realtime/realtime-gemini-live-files-api.py +++ b/examples/realtime/realtime-gemini-live-files-api.py @@ -196,7 +196,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): # Run the pipeline runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() # Clean up: delete the uploaded file and temporary file if file_info: diff --git a/examples/realtime/realtime-gemini-live-google-search.py b/examples/realtime/realtime-gemini-live-google-search.py index f58d168ea..30f299f79 100644 --- a/examples/realtime/realtime-gemini-live-google-search.py +++ b/examples/realtime/realtime-gemini-live-google-search.py @@ -118,7 +118,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-gemini-live-graceful-end.py b/examples/realtime/realtime-gemini-live-graceful-end.py index 29adaddd0..5a6c5dbf4 100644 --- a/examples/realtime/realtime-gemini-live-graceful-end.py +++ b/examples/realtime/realtime-gemini-live-graceful-end.py @@ -182,7 +182,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-gemini-live-grounding-metadata.py b/examples/realtime/realtime-gemini-live-grounding-metadata.py index dde140d9c..8b32851c4 100644 --- a/examples/realtime/realtime-gemini-live-grounding-metadata.py +++ b/examples/realtime/realtime-gemini-live-grounding-metadata.py @@ -152,7 +152,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-gemini-live-local-vad.py b/examples/realtime/realtime-gemini-live-local-vad.py index 9829f2ac6..95a31c4ce 100644 --- a/examples/realtime/realtime-gemini-live-local-vad.py +++ b/examples/realtime/realtime-gemini-live-local-vad.py @@ -121,7 +121,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-gemini-live-vertex.py b/examples/realtime/realtime-gemini-live-vertex.py index b57de3204..e14fca1b7 100644 --- a/examples/realtime/realtime-gemini-live-vertex.py +++ b/examples/realtime/realtime-gemini-live-vertex.py @@ -158,7 +158,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-gemini-live-video.py b/examples/realtime/realtime-gemini-live-video.py index 8051fa07d..35a570743 100644 --- a/examples/realtime/realtime-gemini-live-video.py +++ b/examples/realtime/realtime-gemini-live-video.py @@ -105,7 +105,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-gemini-live.py b/examples/realtime/realtime-gemini-live.py index 4277f4388..0ef04f661 100644 --- a/examples/realtime/realtime-gemini-live.py +++ b/examples/realtime/realtime-gemini-live.py @@ -180,7 +180,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-grok-async-tool.py b/examples/realtime/realtime-grok-async-tool.py index db0a70877..221f1ef49 100644 --- a/examples/realtime/realtime-grok-async-tool.py +++ b/examples/realtime/realtime-grok-async-tool.py @@ -164,7 +164,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-grok.py b/examples/realtime/realtime-grok.py index 52f71eda5..c867d14c0 100644 --- a/examples/realtime/realtime-grok.py +++ b/examples/realtime/realtime-grok.py @@ -263,7 +263,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-inworld.py b/examples/realtime/realtime-inworld.py index 4546c21ac..4f6e5aad4 100644 --- a/examples/realtime/realtime-inworld.py +++ b/examples/realtime/realtime-inworld.py @@ -194,7 +194,8 @@ Always be helpful and proactive in offering assistance.""", runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-openai-async-tool.py b/examples/realtime/realtime-openai-async-tool.py index 0c458d134..b3f71a256 100644 --- a/examples/realtime/realtime-openai-async-tool.py +++ b/examples/realtime/realtime-openai-async-tool.py @@ -183,7 +183,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-openai-live-video.py b/examples/realtime/realtime-openai-live-video.py index 67eed92cd..761c5ad0a 100644 --- a/examples/realtime/realtime-openai-live-video.py +++ b/examples/realtime/realtime-openai-live-video.py @@ -145,7 +145,8 @@ Remember, your responses should be short. Just one or two sentences, usually. Re runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-openai-text.py b/examples/realtime/realtime-openai-text.py index a79282e7a..ece4e328a 100644 --- a/examples/realtime/realtime-openai-text.py +++ b/examples/realtime/realtime-openai-text.py @@ -213,7 +213,8 @@ Remember, your responses should be short. Just one or two sentences, usually. Re runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-openai.py b/examples/realtime/realtime-openai.py index 359c8acb2..15c19eb89 100644 --- a/examples/realtime/realtime-openai.py +++ b/examples/realtime/realtime-openai.py @@ -266,7 +266,8 @@ Remember, your responses should be short. Just one or two sentences, usually. Re runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-ultravox-async-tool.py b/examples/realtime/realtime-ultravox-async-tool.py index 3c46f21c6..61c58ea42 100644 --- a/examples/realtime/realtime-ultravox-async-tool.py +++ b/examples/realtime/realtime-ultravox-async-tool.py @@ -171,7 +171,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-ultravox-text.py b/examples/realtime/realtime-ultravox-text.py index 2cc857cdb..142b05581 100644 --- a/examples/realtime/realtime-ultravox-text.py +++ b/examples/realtime/realtime-ultravox-text.py @@ -248,7 +248,8 @@ There is also a secret menu that changes daily. If the user asks about it, use t # Run the pipeline runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/realtime/realtime-ultravox.py b/examples/realtime/realtime-ultravox.py index 448b83b81..ffa637874 100644 --- a/examples/realtime/realtime-ultravox.py +++ b/examples/realtime/realtime-ultravox.py @@ -238,7 +238,8 @@ There is also a secret menu that changes daily. If the user asks about it, use t # Run the pipeline runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/thinking/thinking-anthropic.py b/examples/thinking/thinking-anthropic.py index 131e2599f..84067eb99 100644 --- a/examples/thinking/thinking-anthropic.py +++ b/examples/thinking/thinking-anthropic.py @@ -127,7 +127,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/thinking/thinking-functions-anthropic.py b/examples/thinking/thinking-functions-anthropic.py index e878a4c62..beb41c10b 100644 --- a/examples/thinking/thinking-functions-anthropic.py +++ b/examples/thinking/thinking-functions-anthropic.py @@ -152,7 +152,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/thinking/thinking-functions-google.py b/examples/thinking/thinking-functions-google.py index cfa19d8c2..cc1e7c1b9 100644 --- a/examples/thinking/thinking-functions-google.py +++ b/examples/thinking/thinking-functions-google.py @@ -153,7 +153,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/thinking/thinking-google.py b/examples/thinking/thinking-google.py index db5507a98..727a9108c 100644 --- a/examples/thinking/thinking-google.py +++ b/examples/thinking/thinking-google.py @@ -129,7 +129,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-assemblyai.py b/examples/transcription/transcription-assemblyai.py index b7c40a398..4113bf3b5 100644 --- a/examples/transcription/transcription-assemblyai.py +++ b/examples/transcription/transcription-assemblyai.py @@ -70,7 +70,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-azure.py b/examples/transcription/transcription-azure.py index d660f1056..31cfa4925 100644 --- a/examples/transcription/transcription-azure.py +++ b/examples/transcription/transcription-azure.py @@ -75,7 +75,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-cartesia.py b/examples/transcription/transcription-cartesia.py index 08a7baff9..368da1c2a 100644 --- a/examples/transcription/transcription-cartesia.py +++ b/examples/transcription/transcription-cartesia.py @@ -65,7 +65,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-deepgram.py b/examples/transcription/transcription-deepgram.py index 3ff9ecd5b..8bf5df757 100644 --- a/examples/transcription/transcription-deepgram.py +++ b/examples/transcription/transcription-deepgram.py @@ -70,7 +70,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-elevenlabs.py b/examples/transcription/transcription-elevenlabs.py index a35a26d88..3a21ea5a2 100644 --- a/examples/transcription/transcription-elevenlabs.py +++ b/examples/transcription/transcription-elevenlabs.py @@ -68,7 +68,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-gladia-translation.py b/examples/transcription/transcription-gladia-translation.py index ed463e610..751c54e5c 100644 --- a/examples/transcription/transcription-gladia-translation.py +++ b/examples/transcription/transcription-gladia-translation.py @@ -92,7 +92,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-gladia.py b/examples/transcription/transcription-gladia.py index f36fa00a4..ffc9cbdf1 100644 --- a/examples/transcription/transcription-gladia.py +++ b/examples/transcription/transcription-gladia.py @@ -76,7 +76,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-google-llm.py b/examples/transcription/transcription-google-llm.py index d99a6435d..22b449972 100644 --- a/examples/transcription/transcription-google-llm.py +++ b/examples/transcription/transcription-google-llm.py @@ -377,7 +377,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-gradium.py b/examples/transcription/transcription-gradium.py index 61d655e68..d2c65f4c0 100644 --- a/examples/transcription/transcription-gradium.py +++ b/examples/transcription/transcription-gradium.py @@ -73,7 +73,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-mistral.py b/examples/transcription/transcription-mistral.py index db957e7ca..3df6733de 100644 --- a/examples/transcription/transcription-mistral.py +++ b/examples/transcription/transcription-mistral.py @@ -78,7 +78,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-openai.py b/examples/transcription/transcription-openai.py index 89c2f67c5..4df1fd738 100644 --- a/examples/transcription/transcription-openai.py +++ b/examples/transcription/transcription-openai.py @@ -68,7 +68,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-soniox.py b/examples/transcription/transcription-soniox.py index 865b7ff61..d88c8ce9d 100644 --- a/examples/transcription/transcription-soniox.py +++ b/examples/transcription/transcription-soniox.py @@ -74,7 +74,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-speechmatics.py b/examples/transcription/transcription-speechmatics.py index 99ff94abf..e4ec91277 100644 --- a/examples/transcription/transcription-speechmatics.py +++ b/examples/transcription/transcription-speechmatics.py @@ -87,7 +87,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-whisper-local.py b/examples/transcription/transcription-whisper-local.py index 62a9dbe8f..1f13f3ebb 100644 --- a/examples/transcription/transcription-whisper-local.py +++ b/examples/transcription/transcription-whisper-local.py @@ -55,7 +55,8 @@ async def main(): runner = PipelineRunner(handle_sigint=False if sys.platform == "win32" else True) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/transcription/transcription-whisper-mlx.py b/examples/transcription/transcription-whisper-mlx.py index bed2f09af..4cb733831 100644 --- a/examples/transcription/transcription-whisper-mlx.py +++ b/examples/transcription/transcription-whisper-mlx.py @@ -104,7 +104,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-whisper.py b/examples/transcription/transcription-whisper.py index 3e5d12e9c..45e32f79d 100644 --- a/examples/transcription/transcription-whisper.py +++ b/examples/transcription/transcription-whisper.py @@ -73,7 +73,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transcription/transcription-xai.py b/examples/transcription/transcription-xai.py index 8a994f376..41c87da2c 100644 --- a/examples/transcription/transcription-xai.py +++ b/examples/transcription/transcription-xai.py @@ -71,7 +71,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/transports/transports-daily.py b/examples/transports/transports-daily.py index f66b7fbbf..62f6040ab 100644 --- a/examples/transports/transports-daily.py +++ b/examples/transports/transports-daily.py @@ -102,7 +102,8 @@ async def main(): runner = PipelineRunner() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/transports/transports-livekit.py b/examples/transports/transports-livekit.py index 251b00183..1995e4360 100644 --- a/examples/transports/transports-livekit.py +++ b/examples/transports/transports-livekit.py @@ -131,7 +131,8 @@ async def main(): runner = PipelineRunner() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/transports/transports-small-webrtc.py b/examples/transports/transports-small-webrtc.py index 8206c5442..eefc952e3 100644 --- a/examples/transports/transports-small-webrtc.py +++ b/examples/transports/transports-small-webrtc.py @@ -120,7 +120,8 @@ async def run_example(webrtc_connection: SmallWebRTCConnection): runner = PipelineRunner(handle_sigint=False) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() @app.get("/", include_in_schema=False) diff --git a/examples/transports/transports-vonage.py b/examples/transports/transports-vonage.py index c98b8c015..51e188354 100644 --- a/examples/transports/transports-vonage.py +++ b/examples/transports/transports-vonage.py @@ -127,7 +127,8 @@ Remember, your responses should be short. Just one or two sentences, usually. Re runner = PipelineRunner() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/turn-management/turn-management-detect-user-idle.py b/examples/turn-management/turn-management-detect-user-idle.py index f75d24d3d..add5b79b8 100644 --- a/examples/turn-management/turn-management-detect-user-idle.py +++ b/examples/turn-management/turn-management-detect-user-idle.py @@ -228,7 +228,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/turn-management/turn-management-filter-incomplete-turns-function-calling.py b/examples/turn-management/turn-management-filter-incomplete-turns-function-calling.py index fb40fc256..31b1a75ab 100644 --- a/examples/turn-management/turn-management-filter-incomplete-turns-function-calling.py +++ b/examples/turn-management/turn-management-filter-incomplete-turns-function-calling.py @@ -186,7 +186,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/turn-management/turn-management-filter-incomplete-turns.py b/examples/turn-management/turn-management-filter-incomplete-turns.py index a97bce8bd..a8c0f2fff 100644 --- a/examples/turn-management/turn-management-filter-incomplete-turns.py +++ b/examples/turn-management/turn-management-filter-incomplete-turns.py @@ -161,7 +161,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/turn-management/turn-management-interruption-config.py b/examples/turn-management/turn-management-interruption-config.py index b680e5565..71c399c82 100644 --- a/examples/turn-management/turn-management-interruption-config.py +++ b/examples/turn-management/turn-management-interruption-config.py @@ -120,7 +120,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/turn-management/turn-management-smart-turn-local-coreml.py b/examples/turn-management/turn-management-smart-turn-local-coreml.py index e05f2d531..a36f15b2b 100644 --- a/examples/turn-management/turn-management-smart-turn-local-coreml.py +++ b/examples/turn-management/turn-management-smart-turn-local-coreml.py @@ -142,7 +142,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/turn-management/turn-management-smart-turn-local.py b/examples/turn-management/turn-management-smart-turn-local.py index 5ba66378f..5473401b1 100644 --- a/examples/turn-management/turn-management-smart-turn-local.py +++ b/examples/turn-management/turn-management-smart-turn-local.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/turn-management/turn-management-turn-tracking-observer.py b/examples/turn-management/turn-management-turn-tracking-observer.py index d74ecb309..1066419b4 100644 --- a/examples/turn-management/turn-management-turn-tracking-observer.py +++ b/examples/turn-management/turn-management-turn-tracking-observer.py @@ -203,7 +203,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/turn-management/turn-management-user-assistant-turns.py b/examples/turn-management/turn-management-user-assistant-turns.py index a3d2256f6..6855d9b62 100644 --- a/examples/turn-management/turn-management-user-assistant-turns.py +++ b/examples/turn-management/turn-management-user-assistant-turns.py @@ -188,7 +188,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await transcript_handler.on_assistant_transcript(message) runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/turn-management/turn-management-user-mute-strategy.py b/examples/turn-management/turn-management-user-mute-strategy.py index e7e36aafa..357efa91a 100644 --- a/examples/turn-management/turn-management-user-mute-strategy.py +++ b/examples/turn-management/turn-management-user-mute-strategy.py @@ -164,7 +164,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-anthropic.py b/examples/update-settings/llm/llm-anthropic.py index 3f3d86f21..91a1111cc 100644 --- a/examples/update-settings/llm/llm-anthropic.py +++ b/examples/update-settings/llm/llm-anthropic.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-aws-bedrock.py b/examples/update-settings/llm/llm-aws-bedrock.py index 2042b885e..c3e8569a3 100644 --- a/examples/update-settings/llm/llm-aws-bedrock.py +++ b/examples/update-settings/llm/llm-aws-bedrock.py @@ -116,7 +116,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-aws-nova-sonic.py b/examples/update-settings/llm/llm-aws-nova-sonic.py index 8fb74ba6b..a4c4fef23 100644 --- a/examples/update-settings/llm/llm-aws-nova-sonic.py +++ b/examples/update-settings/llm/llm-aws-nova-sonic.py @@ -101,7 +101,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-azure-realtime.py b/examples/update-settings/llm/llm-azure-realtime.py index dc2f22fce..c004f1eac 100644 --- a/examples/update-settings/llm/llm-azure-realtime.py +++ b/examples/update-settings/llm/llm-azure-realtime.py @@ -126,7 +126,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-azure.py b/examples/update-settings/llm/llm-azure.py index e7c0cc065..3541afd20 100644 --- a/examples/update-settings/llm/llm-azure.py +++ b/examples/update-settings/llm/llm-azure.py @@ -116,7 +116,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-cerebras.py b/examples/update-settings/llm/llm-cerebras.py index 30dee0c2e..70af6bfd5 100644 --- a/examples/update-settings/llm/llm-cerebras.py +++ b/examples/update-settings/llm/llm-cerebras.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-deepseek.py b/examples/update-settings/llm/llm-deepseek.py index 8cc45d763..e49f4bb0f 100644 --- a/examples/update-settings/llm/llm-deepseek.py +++ b/examples/update-settings/llm/llm-deepseek.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-fireworks.py b/examples/update-settings/llm/llm-fireworks.py index d69bbe5ff..c78fd8797 100644 --- a/examples/update-settings/llm/llm-fireworks.py +++ b/examples/update-settings/llm/llm-fireworks.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-gemini-live-vertex.py b/examples/update-settings/llm/llm-gemini-live-vertex.py index 85ca682d0..e40614c01 100644 --- a/examples/update-settings/llm/llm-gemini-live-vertex.py +++ b/examples/update-settings/llm/llm-gemini-live-vertex.py @@ -103,7 +103,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-gemini-live.py b/examples/update-settings/llm/llm-gemini-live.py index fd83c6662..426f8da58 100644 --- a/examples/update-settings/llm/llm-gemini-live.py +++ b/examples/update-settings/llm/llm-gemini-live.py @@ -101,7 +101,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-google-vertex.py b/examples/update-settings/llm/llm-google-vertex.py index 5a69f4a50..467e666e6 100644 --- a/examples/update-settings/llm/llm-google-vertex.py +++ b/examples/update-settings/llm/llm-google-vertex.py @@ -116,7 +116,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-google.py b/examples/update-settings/llm/llm-google.py index 26f0f0d8c..d15e55add 100644 --- a/examples/update-settings/llm/llm-google.py +++ b/examples/update-settings/llm/llm-google.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-grok-realtime.py b/examples/update-settings/llm/llm-grok-realtime.py index bcaf112c6..1df44d74e 100644 --- a/examples/update-settings/llm/llm-grok-realtime.py +++ b/examples/update-settings/llm/llm-grok-realtime.py @@ -113,7 +113,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-grok.py b/examples/update-settings/llm/llm-grok.py index c1b7cd392..48f5014e8 100644 --- a/examples/update-settings/llm/llm-grok.py +++ b/examples/update-settings/llm/llm-grok.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-groq.py b/examples/update-settings/llm/llm-groq.py index 8ddcd2e3d..c564e6187 100644 --- a/examples/update-settings/llm/llm-groq.py +++ b/examples/update-settings/llm/llm-groq.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-mistral.py b/examples/update-settings/llm/llm-mistral.py index 9030815e7..16cd744db 100644 --- a/examples/update-settings/llm/llm-mistral.py +++ b/examples/update-settings/llm/llm-mistral.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-nvidia.py b/examples/update-settings/llm/llm-nvidia.py index 2a5716edc..caac1cf5c 100644 --- a/examples/update-settings/llm/llm-nvidia.py +++ b/examples/update-settings/llm/llm-nvidia.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-ollama.py b/examples/update-settings/llm/llm-ollama.py index 638119434..5755023df 100644 --- a/examples/update-settings/llm/llm-ollama.py +++ b/examples/update-settings/llm/llm-ollama.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-openai-realtime.py b/examples/update-settings/llm/llm-openai-realtime.py index 51d32be30..b2ebba1f0 100644 --- a/examples/update-settings/llm/llm-openai-realtime.py +++ b/examples/update-settings/llm/llm-openai-realtime.py @@ -123,7 +123,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-openai-responses-http.py b/examples/update-settings/llm/llm-openai-responses-http.py index 8cdb894eb..9e49a11ab 100644 --- a/examples/update-settings/llm/llm-openai-responses-http.py +++ b/examples/update-settings/llm/llm-openai-responses-http.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-openai-responses.py b/examples/update-settings/llm/llm-openai-responses.py index b004377b4..5dd576174 100644 --- a/examples/update-settings/llm/llm-openai-responses.py +++ b/examples/update-settings/llm/llm-openai-responses.py @@ -117,7 +117,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-openai.py b/examples/update-settings/llm/llm-openai.py index 0c7bfc01a..c7bd7f278 100644 --- a/examples/update-settings/llm/llm-openai.py +++ b/examples/update-settings/llm/llm-openai.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-openrouter.py b/examples/update-settings/llm/llm-openrouter.py index aeeaac716..89b475ba6 100644 --- a/examples/update-settings/llm/llm-openrouter.py +++ b/examples/update-settings/llm/llm-openrouter.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-perplexity.py b/examples/update-settings/llm/llm-perplexity.py index 1c334258f..1ac2d0b8a 100644 --- a/examples/update-settings/llm/llm-perplexity.py +++ b/examples/update-settings/llm/llm-perplexity.py @@ -109,7 +109,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-qwen.py b/examples/update-settings/llm/llm-qwen.py index c4827b42d..ee828d45f 100644 --- a/examples/update-settings/llm/llm-qwen.py +++ b/examples/update-settings/llm/llm-qwen.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-sambanova.py b/examples/update-settings/llm/llm-sambanova.py index ab12e07f0..5c642d763 100644 --- a/examples/update-settings/llm/llm-sambanova.py +++ b/examples/update-settings/llm/llm-sambanova.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-sarvam.py b/examples/update-settings/llm/llm-sarvam.py index 26d2eb47a..9007865c7 100644 --- a/examples/update-settings/llm/llm-sarvam.py +++ b/examples/update-settings/llm/llm-sarvam.py @@ -116,7 +116,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-together.py b/examples/update-settings/llm/llm-together.py index 3d60b6b72..e00e0fc5c 100644 --- a/examples/update-settings/llm/llm-together.py +++ b/examples/update-settings/llm/llm-together.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/llm/llm-ultravox-realtime.py b/examples/update-settings/llm/llm-ultravox-realtime.py index f6ad54a27..b414db724 100644 --- a/examples/update-settings/llm/llm-ultravox-realtime.py +++ b/examples/update-settings/llm/llm-ultravox-realtime.py @@ -126,7 +126,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-assemblyai.py b/examples/update-settings/stt/stt-assemblyai.py index 530af6554..c989e239b 100644 --- a/examples/update-settings/stt/stt-assemblyai.py +++ b/examples/update-settings/stt/stt-assemblyai.py @@ -127,7 +127,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-aws-transcribe.py b/examples/update-settings/stt/stt-aws-transcribe.py index 5f34df8e6..241c0c2bc 100644 --- a/examples/update-settings/stt/stt-aws-transcribe.py +++ b/examples/update-settings/stt/stt-aws-transcribe.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-azure.py b/examples/update-settings/stt/stt-azure.py index 6e16d640e..11eb442e2 100644 --- a/examples/update-settings/stt/stt-azure.py +++ b/examples/update-settings/stt/stt-azure.py @@ -118,7 +118,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-cartesia.py b/examples/update-settings/stt/stt-cartesia.py index cd73471f5..2bb98d87e 100644 --- a/examples/update-settings/stt/stt-cartesia.py +++ b/examples/update-settings/stt/stt-cartesia.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-deepgram-flux.py b/examples/update-settings/stt/stt-deepgram-flux.py index 3994b9ea3..9b3509d8e 100644 --- a/examples/update-settings/stt/stt-deepgram-flux.py +++ b/examples/update-settings/stt/stt-deepgram-flux.py @@ -145,7 +145,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-deepgram-sagemaker.py b/examples/update-settings/stt/stt-deepgram-sagemaker.py index e963c78ac..dc993a7c3 100644 --- a/examples/update-settings/stt/stt-deepgram-sagemaker.py +++ b/examples/update-settings/stt/stt-deepgram-sagemaker.py @@ -131,7 +131,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-deepgram.py b/examples/update-settings/stt/stt-deepgram.py index 082d4cde4..6bfef3029 100644 --- a/examples/update-settings/stt/stt-deepgram.py +++ b/examples/update-settings/stt/stt-deepgram.py @@ -128,7 +128,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-elevenlabs-realtime.py b/examples/update-settings/stt/stt-elevenlabs-realtime.py index ff0bf51b8..9e88764ab 100644 --- a/examples/update-settings/stt/stt-elevenlabs-realtime.py +++ b/examples/update-settings/stt/stt-elevenlabs-realtime.py @@ -117,7 +117,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-elevenlabs.py b/examples/update-settings/stt/stt-elevenlabs.py index 5f7ab8f9a..243b85258 100644 --- a/examples/update-settings/stt/stt-elevenlabs.py +++ b/examples/update-settings/stt/stt-elevenlabs.py @@ -120,7 +120,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-fal.py b/examples/update-settings/stt/stt-fal.py index cb39f834f..224f072a2 100644 --- a/examples/update-settings/stt/stt-fal.py +++ b/examples/update-settings/stt/stt-fal.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-gladia.py b/examples/update-settings/stt/stt-gladia.py index 9f57d535f..93776a37c 100644 --- a/examples/update-settings/stt/stt-gladia.py +++ b/examples/update-settings/stt/stt-gladia.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-google.py b/examples/update-settings/stt/stt-google.py index ef01b13df..9228ef492 100644 --- a/examples/update-settings/stt/stt-google.py +++ b/examples/update-settings/stt/stt-google.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-gradium.py b/examples/update-settings/stt/stt-gradium.py index dbb8472bb..5fffac027 100644 --- a/examples/update-settings/stt/stt-gradium.py +++ b/examples/update-settings/stt/stt-gradium.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-groq.py b/examples/update-settings/stt/stt-groq.py index 1cb98a4bc..b8c518e90 100644 --- a/examples/update-settings/stt/stt-groq.py +++ b/examples/update-settings/stt/stt-groq.py @@ -116,7 +116,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-nvidia-segmented.py b/examples/update-settings/stt/stt-nvidia-segmented.py index 9ca4f23e3..54a550b03 100644 --- a/examples/update-settings/stt/stt-nvidia-segmented.py +++ b/examples/update-settings/stt/stt-nvidia-segmented.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-nvidia.py b/examples/update-settings/stt/stt-nvidia.py index 1e77b94df..c5d16afc8 100644 --- a/examples/update-settings/stt/stt-nvidia.py +++ b/examples/update-settings/stt/stt-nvidia.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-openai-realtime.py b/examples/update-settings/stt/stt-openai-realtime.py index cc4f8e65c..afec09644 100644 --- a/examples/update-settings/stt/stt-openai-realtime.py +++ b/examples/update-settings/stt/stt-openai-realtime.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-sarvam.py b/examples/update-settings/stt/stt-sarvam.py index 535d5bfd2..4b9de8efd 100644 --- a/examples/update-settings/stt/stt-sarvam.py +++ b/examples/update-settings/stt/stt-sarvam.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-soniox.py b/examples/update-settings/stt/stt-soniox.py index cc90798d4..939fa696e 100644 --- a/examples/update-settings/stt/stt-soniox.py +++ b/examples/update-settings/stt/stt-soniox.py @@ -110,7 +110,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-speechmatics.py b/examples/update-settings/stt/stt-speechmatics.py index 547fdfde3..0e1f4720f 100644 --- a/examples/update-settings/stt/stt-speechmatics.py +++ b/examples/update-settings/stt/stt-speechmatics.py @@ -140,7 +140,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-whisper-api.py b/examples/update-settings/stt/stt-whisper-api.py index 95e40a6c5..323b4798f 100644 --- a/examples/update-settings/stt/stt-whisper-api.py +++ b/examples/update-settings/stt/stt-whisper-api.py @@ -121,7 +121,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-whisper-mlx.py b/examples/update-settings/stt/stt-whisper-mlx.py index 3f7a06025..e59495c71 100644 --- a/examples/update-settings/stt/stt-whisper-mlx.py +++ b/examples/update-settings/stt/stt-whisper-mlx.py @@ -123,7 +123,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/stt/stt-whisper.py b/examples/update-settings/stt/stt-whisper.py index 78d8fecd1..d726f3dee 100644 --- a/examples/update-settings/stt/stt-whisper.py +++ b/examples/update-settings/stt/stt-whisper.py @@ -122,7 +122,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-asyncai-http.py b/examples/update-settings/tts/tts-asyncai-http.py index a14efd0d2..14910932c 100644 --- a/examples/update-settings/tts/tts-asyncai-http.py +++ b/examples/update-settings/tts/tts-asyncai-http.py @@ -120,7 +120,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-asyncai.py b/examples/update-settings/tts/tts-asyncai.py index e24636d82..89f7b0cc5 100644 --- a/examples/update-settings/tts/tts-asyncai.py +++ b/examples/update-settings/tts/tts-asyncai.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-aws-polly.py b/examples/update-settings/tts/tts-aws-polly.py index bb352a2ba..eef27ed7f 100644 --- a/examples/update-settings/tts/tts-aws-polly.py +++ b/examples/update-settings/tts/tts-aws-polly.py @@ -109,7 +109,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-azure-http.py b/examples/update-settings/tts/tts-azure-http.py index e75862ca1..d96cb69c3 100644 --- a/examples/update-settings/tts/tts-azure-http.py +++ b/examples/update-settings/tts/tts-azure-http.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-azure.py b/examples/update-settings/tts/tts-azure.py index 2896b3209..3a9fa2c59 100644 --- a/examples/update-settings/tts/tts-azure.py +++ b/examples/update-settings/tts/tts-azure.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-camb.py b/examples/update-settings/tts/tts-camb.py index 40831592f..96d66de50 100644 --- a/examples/update-settings/tts/tts-camb.py +++ b/examples/update-settings/tts/tts-camb.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-cartesia-http.py b/examples/update-settings/tts/tts-cartesia-http.py index 85deb7458..6150e998e 100644 --- a/examples/update-settings/tts/tts-cartesia-http.py +++ b/examples/update-settings/tts/tts-cartesia-http.py @@ -116,7 +116,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-cartesia.py b/examples/update-settings/tts/tts-cartesia.py index 1d06d36a0..666613955 100644 --- a/examples/update-settings/tts/tts-cartesia.py +++ b/examples/update-settings/tts/tts-cartesia.py @@ -119,7 +119,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-deepgram-http.py b/examples/update-settings/tts/tts-deepgram-http.py index 0ac952d47..e10ef8736 100644 --- a/examples/update-settings/tts/tts-deepgram-http.py +++ b/examples/update-settings/tts/tts-deepgram-http.py @@ -126,7 +126,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-deepgram-sagemaker.py b/examples/update-settings/tts/tts-deepgram-sagemaker.py index 7b3ca1661..0146e281e 100644 --- a/examples/update-settings/tts/tts-deepgram-sagemaker.py +++ b/examples/update-settings/tts/tts-deepgram-sagemaker.py @@ -123,7 +123,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-deepgram.py b/examples/update-settings/tts/tts-deepgram.py index d1410c9de..d2630305d 100644 --- a/examples/update-settings/tts/tts-deepgram.py +++ b/examples/update-settings/tts/tts-deepgram.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-elevenlabs-http.py b/examples/update-settings/tts/tts-elevenlabs-http.py index 9a9f97642..2b1540a03 100644 --- a/examples/update-settings/tts/tts-elevenlabs-http.py +++ b/examples/update-settings/tts/tts-elevenlabs-http.py @@ -122,7 +122,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-elevenlabs.py b/examples/update-settings/tts/tts-elevenlabs.py index 740cc3779..cb5c1008e 100644 --- a/examples/update-settings/tts/tts-elevenlabs.py +++ b/examples/update-settings/tts/tts-elevenlabs.py @@ -130,7 +130,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-fish.py b/examples/update-settings/tts/tts-fish.py index 2e62e906d..63dac2679 100644 --- a/examples/update-settings/tts/tts-fish.py +++ b/examples/update-settings/tts/tts-fish.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-gemini.py b/examples/update-settings/tts/tts-gemini.py index 94e3de01c..ccc03e45c 100644 --- a/examples/update-settings/tts/tts-gemini.py +++ b/examples/update-settings/tts/tts-gemini.py @@ -120,7 +120,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-google-http.py b/examples/update-settings/tts/tts-google-http.py index d007f691b..ab71fc772 100644 --- a/examples/update-settings/tts/tts-google-http.py +++ b/examples/update-settings/tts/tts-google-http.py @@ -109,7 +109,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-google-stream.py b/examples/update-settings/tts/tts-google-stream.py index 3ddac5617..bc824277d 100644 --- a/examples/update-settings/tts/tts-google-stream.py +++ b/examples/update-settings/tts/tts-google-stream.py @@ -109,7 +109,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-gradium.py b/examples/update-settings/tts/tts-gradium.py index dbc18ccdd..463bc977f 100644 --- a/examples/update-settings/tts/tts-gradium.py +++ b/examples/update-settings/tts/tts-gradium.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-groq.py b/examples/update-settings/tts/tts-groq.py index ee492f69a..9bf1d9e9b 100644 --- a/examples/update-settings/tts/tts-groq.py +++ b/examples/update-settings/tts/tts-groq.py @@ -109,7 +109,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-hume.py b/examples/update-settings/tts/tts-hume.py index 36a5bbc30..3d21a2c13 100644 --- a/examples/update-settings/tts/tts-hume.py +++ b/examples/update-settings/tts/tts-hume.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-inworld-http.py b/examples/update-settings/tts/tts-inworld-http.py index 081ad6ed2..ea33b70bf 100644 --- a/examples/update-settings/tts/tts-inworld-http.py +++ b/examples/update-settings/tts/tts-inworld-http.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-inworld.py b/examples/update-settings/tts/tts-inworld.py index 0808b148d..ee4e8b036 100644 --- a/examples/update-settings/tts/tts-inworld.py +++ b/examples/update-settings/tts/tts-inworld.py @@ -111,7 +111,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-kokoro.py b/examples/update-settings/tts/tts-kokoro.py index 12573b6a7..8c908f9e8 100644 --- a/examples/update-settings/tts/tts-kokoro.py +++ b/examples/update-settings/tts/tts-kokoro.py @@ -113,7 +113,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-lmnt.py b/examples/update-settings/tts/tts-lmnt.py index edf8c0ab7..dda8a4aac 100644 --- a/examples/update-settings/tts/tts-lmnt.py +++ b/examples/update-settings/tts/tts-lmnt.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-minimax.py b/examples/update-settings/tts/tts-minimax.py index 6a7c105b7..ae023516b 100644 --- a/examples/update-settings/tts/tts-minimax.py +++ b/examples/update-settings/tts/tts-minimax.py @@ -117,7 +117,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-neuphonic-http.py b/examples/update-settings/tts/tts-neuphonic-http.py index 590f924af..07265bcf4 100644 --- a/examples/update-settings/tts/tts-neuphonic-http.py +++ b/examples/update-settings/tts/tts-neuphonic-http.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-neuphonic.py b/examples/update-settings/tts/tts-neuphonic.py index 4ab39ef2e..27487a4f2 100644 --- a/examples/update-settings/tts/tts-neuphonic.py +++ b/examples/update-settings/tts/tts-neuphonic.py @@ -109,7 +109,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-nvidia.py b/examples/update-settings/tts/tts-nvidia.py index 334ce3e59..116498399 100644 --- a/examples/update-settings/tts/tts-nvidia.py +++ b/examples/update-settings/tts/tts-nvidia.py @@ -110,7 +110,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-openai.py b/examples/update-settings/tts/tts-openai.py index 82a5509ef..a8b488aac 100644 --- a/examples/update-settings/tts/tts-openai.py +++ b/examples/update-settings/tts/tts-openai.py @@ -108,7 +108,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-piper-http.py b/examples/update-settings/tts/tts-piper-http.py index bc6b94c24..0561c95e3 100644 --- a/examples/update-settings/tts/tts-piper-http.py +++ b/examples/update-settings/tts/tts-piper-http.py @@ -118,7 +118,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-piper.py b/examples/update-settings/tts/tts-piper.py index dca4573da..126a9095d 100644 --- a/examples/update-settings/tts/tts-piper.py +++ b/examples/update-settings/tts/tts-piper.py @@ -116,7 +116,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-resembleai.py b/examples/update-settings/tts/tts-resembleai.py index 4642e25e3..4c8a08832 100644 --- a/examples/update-settings/tts/tts-resembleai.py +++ b/examples/update-settings/tts/tts-resembleai.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-rime-http.py b/examples/update-settings/tts/tts-rime-http.py index 09188c3e5..1cd165c8a 100644 --- a/examples/update-settings/tts/tts-rime-http.py +++ b/examples/update-settings/tts/tts-rime-http.py @@ -117,7 +117,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-rime.py b/examples/update-settings/tts/tts-rime.py index e81eb6804..e3f9b72df 100644 --- a/examples/update-settings/tts/tts-rime.py +++ b/examples/update-settings/tts/tts-rime.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-sarvam-http.py b/examples/update-settings/tts/tts-sarvam-http.py index 1dfcc041a..09146976c 100644 --- a/examples/update-settings/tts/tts-sarvam-http.py +++ b/examples/update-settings/tts/tts-sarvam-http.py @@ -113,7 +113,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-sarvam.py b/examples/update-settings/tts/tts-sarvam.py index 1dfc882e0..84a987bcd 100644 --- a/examples/update-settings/tts/tts-sarvam.py +++ b/examples/update-settings/tts/tts-sarvam.py @@ -107,7 +107,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-speechmatics.py b/examples/update-settings/tts/tts-speechmatics.py index 61212918b..65a4894fc 100644 --- a/examples/update-settings/tts/tts-speechmatics.py +++ b/examples/update-settings/tts/tts-speechmatics.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/update-settings/tts/tts-xtts.py b/examples/update-settings/tts/tts-xtts.py index 061b64723..00a0528ca 100644 --- a/examples/update-settings/tts/tts-xtts.py +++ b/examples/update-settings/tts/tts-xtts.py @@ -118,7 +118,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/video-avatar/video-avatar-heygen-transport.py b/examples/video-avatar/video-avatar-heygen-transport.py index 5cc1a390b..f872aa6c8 100644 --- a/examples/video-avatar/video-avatar-heygen-transport.py +++ b/examples/video-avatar/video-avatar-heygen-transport.py @@ -113,7 +113,8 @@ async def main(): runner = PipelineRunner() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/video-avatar/video-avatar-heygen-video-service.py b/examples/video-avatar/video-avatar-heygen-video-service.py index b7ffb4b94..39d3462ef 100644 --- a/examples/video-avatar/video-avatar-heygen-video-service.py +++ b/examples/video-avatar/video-avatar-heygen-video-service.py @@ -146,7 +146,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/video-avatar/video-avatar-lemonslice-transport.py b/examples/video-avatar/video-avatar-lemonslice-transport.py index 3899c0393..8c6eb5f61 100644 --- a/examples/video-avatar/video-avatar-lemonslice-transport.py +++ b/examples/video-avatar/video-avatar-lemonslice-transport.py @@ -124,7 +124,8 @@ async def main(): runner = PipelineRunner() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/video-avatar/video-avatar-simli-video-service.py b/examples/video-avatar/video-avatar-simli-video-service.py index 7350a47dc..2f1a12ad7 100644 --- a/examples/video-avatar/video-avatar-simli-video-service.py +++ b/examples/video-avatar/video-avatar-simli-video-service.py @@ -117,7 +117,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/video-avatar/video-avatar-tavus-transport.py b/examples/video-avatar/video-avatar-tavus-transport.py index ed336d648..87e1fa8a2 100644 --- a/examples/video-avatar/video-avatar-tavus-transport.py +++ b/examples/video-avatar/video-avatar-tavus-transport.py @@ -118,7 +118,8 @@ async def main(): runner = PipelineRunner() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() if __name__ == "__main__": diff --git a/examples/video-avatar/video-avatar-tavus-video-service.py b/examples/video-avatar/video-avatar-tavus-video-service.py index 194622dd6..76fc03b85 100644 --- a/examples/video-avatar/video-avatar-tavus-video-service.py +++ b/examples/video-avatar/video-avatar-tavus-video-service.py @@ -130,7 +130,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/video-processing/video-processing-custom-video-track.py b/examples/video-processing/video-processing-custom-video-track.py index 797f98875..7667befe3 100644 --- a/examples/video-processing/video-processing-custom-video-track.py +++ b/examples/video-processing/video-processing-custom-video-track.py @@ -192,7 +192,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.queue_frame(EndFrame()) runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/video-processing/video-processing-gstreamer-filesrc.py b/examples/video-processing/video-processing-gstreamer-filesrc.py index ca4ff4545..15a4d17b3 100644 --- a/examples/video-processing/video-processing-gstreamer-filesrc.py +++ b/examples/video-processing/video-processing-gstreamer-filesrc.py @@ -74,7 +74,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/video-processing/video-processing-gstreamer-videotestsrc.py b/examples/video-processing/video-processing-gstreamer-videotestsrc.py index e9d0855f9..bc8d75f48 100644 --- a/examples/video-processing/video-processing-gstreamer-videotestsrc.py +++ b/examples/video-processing/video-processing-gstreamer-videotestsrc.py @@ -61,7 +61,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/video-processing/video-processing-local-mirror.py b/examples/video-processing/video-processing-local-mirror.py index 31756c9a2..d1157cb14 100644 --- a/examples/video-processing/video-processing-local-mirror.py +++ b/examples/video-processing/video-processing-local-mirror.py @@ -117,7 +117,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await asyncio.gather(runner.run(worker), run_tk()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), run_tk()) async def bot(runner_args: RunnerArguments): diff --git a/examples/video-processing/video-processing-mirror.py b/examples/video-processing/video-processing-mirror.py index fc14325fc..2bc80d612 100644 --- a/examples/video-processing/video-processing-mirror.py +++ b/examples/video-processing/video-processing-mirror.py @@ -93,7 +93,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/video-processing/video-processing.py b/examples/video-processing/video-processing.py index 390e6eeff..69fd2cb46 100644 --- a/examples/video-processing/video-processing.py +++ b/examples/video-processing/video-processing.py @@ -157,7 +157,8 @@ async def run_bot(pipecat_transport): runner = PipelineRunner(handle_sigint=False, force_gc=True) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/vision/vision-anthropic.py b/examples/vision/vision-anthropic.py index 19078e8e8..88fc64b55 100644 --- a/examples/vision/vision-anthropic.py +++ b/examples/vision/vision-anthropic.py @@ -124,7 +124,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/vision/vision-aws.py b/examples/vision/vision-aws.py index ed181f585..655b7763e 100644 --- a/examples/vision/vision-aws.py +++ b/examples/vision/vision-aws.py @@ -126,7 +126,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/vision/vision-gemini-flash.py b/examples/vision/vision-gemini-flash.py index 6870e80e1..71617d37c 100644 --- a/examples/vision/vision-gemini-flash.py +++ b/examples/vision/vision-gemini-flash.py @@ -124,7 +124,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/vision/vision-moondream.py b/examples/vision/vision-moondream.py index aa6b942f9..845777e94 100644 --- a/examples/vision/vision-moondream.py +++ b/examples/vision/vision-moondream.py @@ -100,7 +100,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/vision/vision-openai-responses-http.py b/examples/vision/vision-openai-responses-http.py index 802eba940..b281bc307 100644 --- a/examples/vision/vision-openai-responses-http.py +++ b/examples/vision/vision-openai-responses-http.py @@ -124,7 +124,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/vision/vision-openai-responses.py b/examples/vision/vision-openai-responses.py index 21f3fb64b..4b3a9d830 100644 --- a/examples/vision/vision-openai-responses.py +++ b/examples/vision/vision-openai-responses.py @@ -124,7 +124,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/vision/vision-openai.py b/examples/vision/vision-openai.py index 2bf098e56..8154f2147 100644 --- a/examples/vision/vision-openai.py +++ b/examples/vision/vision-openai.py @@ -124,7 +124,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-aicoustics.py b/examples/voice/voice-aicoustics.py index 46f10bbee..efbdd7587 100644 --- a/examples/voice/voice-aicoustics.py +++ b/examples/voice/voice-aicoustics.py @@ -156,7 +156,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-assemblyai-turn-detection.py b/examples/voice/voice-assemblyai-turn-detection.py index bdaa56ddc..9a23c5981 100644 --- a/examples/voice/voice-assemblyai-turn-detection.py +++ b/examples/voice/voice-assemblyai-turn-detection.py @@ -165,7 +165,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-assemblyai.py b/examples/voice/voice-assemblyai.py index 7e6bc14f9..890d1085e 100644 --- a/examples/voice/voice-assemblyai.py +++ b/examples/voice/voice-assemblyai.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-asyncai-http.py b/examples/voice/voice-asyncai-http.py index 812c2054a..b7fce5041 100644 --- a/examples/voice/voice-asyncai-http.py +++ b/examples/voice/voice-asyncai-http.py @@ -116,7 +116,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-asyncai.py b/examples/voice/voice-asyncai.py index 42deabdfd..ffcf7c8a2 100644 --- a/examples/voice/voice-asyncai.py +++ b/examples/voice/voice-asyncai.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-aws-strands.py b/examples/voice/voice-aws-strands.py index 6c9f1a895..e01e6919e 100644 --- a/examples/voice/voice-aws-strands.py +++ b/examples/voice/voice-aws-strands.py @@ -167,7 +167,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-aws.py b/examples/voice/voice-aws.py index 7e82c6c44..10b245cc8 100644 --- a/examples/voice/voice-aws.py +++ b/examples/voice/voice-aws.py @@ -113,7 +113,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-azure-http.py b/examples/voice/voice-azure-http.py index bdeb6481a..964fabb18 100644 --- a/examples/voice/voice-azure-http.py +++ b/examples/voice/voice-azure-http.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-azure.py b/examples/voice/voice-azure.py index 3465461e4..4e9133e34 100644 --- a/examples/voice/voice-azure.py +++ b/examples/voice/voice-azure.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-camb.py b/examples/voice/voice-camb.py index e351267b1..f0bbd2b3c 100644 --- a/examples/voice/voice-camb.py +++ b/examples/voice/voice-camb.py @@ -111,7 +111,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-cartesia-http.py b/examples/voice/voice-cartesia-http.py index 9944c5073..ecdc9ca68 100644 --- a/examples/voice/voice-cartesia-http.py +++ b/examples/voice/voice-cartesia-http.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-cartesia.py b/examples/voice/voice-cartesia.py index fc01c9e0e..36cd0efd0 100644 --- a/examples/voice/voice-cartesia.py +++ b/examples/voice/voice-cartesia.py @@ -110,7 +110,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-deepgram-flux-sagemaker.py b/examples/voice/voice-deepgram-flux-sagemaker.py index 6e4536c24..b490f9ea4 100644 --- a/examples/voice/voice-deepgram-flux-sagemaker.py +++ b/examples/voice/voice-deepgram-flux-sagemaker.py @@ -136,7 +136,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-deepgram-flux.py b/examples/voice/voice-deepgram-flux.py index a89ed68d8..7bc954f87 100644 --- a/examples/voice/voice-deepgram-flux.py +++ b/examples/voice/voice-deepgram-flux.py @@ -125,7 +125,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-deepgram-http.py b/examples/voice/voice-deepgram-http.py index 571bf3233..0efc9ecf7 100644 --- a/examples/voice/voice-deepgram-http.py +++ b/examples/voice/voice-deepgram-http.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-deepgram-sagemaker.py b/examples/voice/voice-deepgram-sagemaker.py index 50a23beee..d9268c878 100644 --- a/examples/voice/voice-deepgram-sagemaker.py +++ b/examples/voice/voice-deepgram-sagemaker.py @@ -126,7 +126,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-deepgram.py b/examples/voice/voice-deepgram.py index 6f5ef6b0c..238b622c7 100644 --- a/examples/voice/voice-deepgram.py +++ b/examples/voice/voice-deepgram.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-elevenlabs-http.py b/examples/voice/voice-elevenlabs-http.py index 69b42dbe6..d47c79a09 100644 --- a/examples/voice/voice-elevenlabs-http.py +++ b/examples/voice/voice-elevenlabs-http.py @@ -119,7 +119,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-elevenlabs.py b/examples/voice/voice-elevenlabs.py index fc0333492..91a00fa53 100644 --- a/examples/voice/voice-elevenlabs.py +++ b/examples/voice/voice-elevenlabs.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-fal.py b/examples/voice/voice-fal.py index b2bf0568d..343b711fc 100644 --- a/examples/voice/voice-fal.py +++ b/examples/voice/voice-fal.py @@ -117,7 +117,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-fish.py b/examples/voice/voice-fish.py index b995eb019..52b383af7 100644 --- a/examples/voice/voice-fish.py +++ b/examples/voice/voice-fish.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-gladia-vad.py b/examples/voice/voice-gladia-vad.py index de884bea3..a7ec33c8c 100644 --- a/examples/voice/voice-gladia-vad.py +++ b/examples/voice/voice-gladia-vad.py @@ -128,7 +128,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-gladia.py b/examples/voice/voice-gladia.py index cc17786b1..8cf4d4338 100644 --- a/examples/voice/voice-gladia.py +++ b/examples/voice/voice-gladia.py @@ -123,7 +123,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): await worker.cancel() runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-google-audio-in.py b/examples/voice/voice-google-audio-in.py index 63daac37a..d2da954c6 100644 --- a/examples/voice/voice-google-audio-in.py +++ b/examples/voice/voice-google-audio-in.py @@ -281,7 +281,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-google-gemini-tts.py b/examples/voice/voice-google-gemini-tts.py index fb58e5216..c0c5093d2 100644 --- a/examples/voice/voice-google-gemini-tts.py +++ b/examples/voice/voice-google-gemini-tts.py @@ -141,7 +141,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-google-http.py b/examples/voice/voice-google-http.py index 3bf8e7a65..819478896 100644 --- a/examples/voice/voice-google-http.py +++ b/examples/voice/voice-google-http.py @@ -124,7 +124,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-google-image.py b/examples/voice/voice-google-image.py index 34cc83fc4..26f88a539 100644 --- a/examples/voice/voice-google-image.py +++ b/examples/voice/voice-google-image.py @@ -133,7 +133,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-google.py b/examples/voice/voice-google.py index 8b3695628..be81e75af 100644 --- a/examples/voice/voice-google.py +++ b/examples/voice/voice-google.py @@ -124,7 +124,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-gradium.py b/examples/voice/voice-gradium.py index 421b3fd8d..ecc5d9e8c 100644 --- a/examples/voice/voice-gradium.py +++ b/examples/voice/voice-gradium.py @@ -116,7 +116,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-groq.py b/examples/voice/voice-groq.py index 8bec6eedf..0531d6bdc 100644 --- a/examples/voice/voice-groq.py +++ b/examples/voice/voice-groq.py @@ -107,7 +107,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-hume.py b/examples/voice/voice-hume.py index 00b107650..01769272a 100644 --- a/examples/voice/voice-hume.py +++ b/examples/voice/voice-hume.py @@ -125,7 +125,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-inworld-http.py b/examples/voice/voice-inworld-http.py index 9efaeed9a..c301f3513 100644 --- a/examples/voice/voice-inworld-http.py +++ b/examples/voice/voice-inworld-http.py @@ -122,7 +122,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-inworld.py b/examples/voice/voice-inworld.py index 94ab4ad04..33eb15009 100644 --- a/examples/voice/voice-inworld.py +++ b/examples/voice/voice-inworld.py @@ -110,7 +110,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-kokoro.py b/examples/voice/voice-kokoro.py index f1655cba8..bebdac41d 100644 --- a/examples/voice/voice-kokoro.py +++ b/examples/voice/voice-kokoro.py @@ -110,7 +110,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-krisp-viva.py b/examples/voice/voice-krisp-viva.py index fd33c33ed..afc72522d 100644 --- a/examples/voice/voice-krisp-viva.py +++ b/examples/voice/voice-krisp-viva.py @@ -153,7 +153,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-langchain.py b/examples/voice/voice-langchain.py index 4371e11b0..f2395d02f 100644 --- a/examples/voice/voice-langchain.py +++ b/examples/voice/voice-langchain.py @@ -141,7 +141,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-lmnt.py b/examples/voice/voice-lmnt.py index 814912867..30084aba6 100644 --- a/examples/voice/voice-lmnt.py +++ b/examples/voice/voice-lmnt.py @@ -111,7 +111,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-minimax.py b/examples/voice/voice-minimax.py index 0f67a43d2..f98df3122 100644 --- a/examples/voice/voice-minimax.py +++ b/examples/voice/voice-minimax.py @@ -118,7 +118,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-mistral.py b/examples/voice/voice-mistral.py index 5b62bfab0..a030ca10f 100644 --- a/examples/voice/voice-mistral.py +++ b/examples/voice/voice-mistral.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-neuphonic-http.py b/examples/voice/voice-neuphonic-http.py index 4e9d193f4..442f12015 100644 --- a/examples/voice/voice-neuphonic-http.py +++ b/examples/voice/voice-neuphonic-http.py @@ -116,7 +116,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-neuphonic.py b/examples/voice/voice-neuphonic.py index 2786589ef..c27491ad6 100644 --- a/examples/voice/voice-neuphonic.py +++ b/examples/voice/voice-neuphonic.py @@ -111,7 +111,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-nvidia-sagemaker.py b/examples/voice/voice-nvidia-sagemaker.py index bffd864f3..81313e346 100644 --- a/examples/voice/voice-nvidia-sagemaker.py +++ b/examples/voice/voice-nvidia-sagemaker.py @@ -114,7 +114,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-nvidia.py b/examples/voice/voice-nvidia.py index bc4033380..5257efdde 100644 --- a/examples/voice/voice-nvidia.py +++ b/examples/voice/voice-nvidia.py @@ -107,7 +107,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-openai-http.py b/examples/voice/voice-openai-http.py index 2750e96b7..9ef4abd52 100644 --- a/examples/voice/voice-openai-http.py +++ b/examples/voice/voice-openai-http.py @@ -118,7 +118,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-openai-responses-http.py b/examples/voice/voice-openai-responses-http.py index ec8782cdb..338538a8a 100644 --- a/examples/voice/voice-openai-responses-http.py +++ b/examples/voice/voice-openai-responses-http.py @@ -110,7 +110,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-openai-responses.py b/examples/voice/voice-openai-responses.py index c928382d3..cc572e279 100644 --- a/examples/voice/voice-openai-responses.py +++ b/examples/voice/voice-openai-responses.py @@ -110,7 +110,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-openai.py b/examples/voice/voice-openai.py index 9587ccc73..93bcf6dd2 100644 --- a/examples/voice/voice-openai.py +++ b/examples/voice/voice-openai.py @@ -112,7 +112,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-piper.py b/examples/voice/voice-piper.py index d58bf591b..17228394b 100644 --- a/examples/voice/voice-piper.py +++ b/examples/voice/voice-piper.py @@ -110,7 +110,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-resemble.py b/examples/voice/voice-resemble.py index 4f2f02c74..b77805438 100644 --- a/examples/voice/voice-resemble.py +++ b/examples/voice/voice-resemble.py @@ -110,7 +110,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-rime-http.py b/examples/voice/voice-rime-http.py index 6e9d6ef60..ca41ca9e8 100644 --- a/examples/voice/voice-rime-http.py +++ b/examples/voice/voice-rime-http.py @@ -118,7 +118,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-rime.py b/examples/voice/voice-rime.py index e97737d71..8b678c2c0 100644 --- a/examples/voice/voice-rime.py +++ b/examples/voice/voice-rime.py @@ -111,7 +111,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-sarvam-http.py b/examples/voice/voice-sarvam-http.py index b7dc3d578..dab182265 100644 --- a/examples/voice/voice-sarvam-http.py +++ b/examples/voice/voice-sarvam-http.py @@ -122,7 +122,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-sarvam.py b/examples/voice/voice-sarvam.py index f44d0ae28..0731c123e 100644 --- a/examples/voice/voice-sarvam.py +++ b/examples/voice/voice-sarvam.py @@ -119,7 +119,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-smallest.py b/examples/voice/voice-smallest.py index 3ad28323b..cb21a3e15 100644 --- a/examples/voice/voice-smallest.py +++ b/examples/voice/voice-smallest.py @@ -111,7 +111,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-soniox.py b/examples/voice/voice-soniox.py index 842cb716d..8b7b5c29c 100644 --- a/examples/voice/voice-soniox.py +++ b/examples/voice/voice-soniox.py @@ -118,7 +118,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-speechmatics-vad.py b/examples/voice/voice-speechmatics-vad.py index fe208ad7b..d8e0fd06e 100644 --- a/examples/voice/voice-speechmatics-vad.py +++ b/examples/voice/voice-speechmatics-vad.py @@ -158,7 +158,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-speechmatics.py b/examples/voice/voice-speechmatics.py index 2240eaf8c..81021b495 100644 --- a/examples/voice/voice-speechmatics.py +++ b/examples/voice/voice-speechmatics.py @@ -138,7 +138,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-xai-http.py b/examples/voice/voice-xai-http.py index d07188946..b0e5cbc11 100644 --- a/examples/voice/voice-xai-http.py +++ b/examples/voice/voice-xai-http.py @@ -113,7 +113,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-xai.py b/examples/voice/voice-xai.py index 89d88ae86..a7c4495b5 100644 --- a/examples/voice/voice-xai.py +++ b/examples/voice/voice-xai.py @@ -113,7 +113,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/examples/voice/voice-xtts.py b/examples/voice/voice-xtts.py index f5507aa95..907c039b5 100644 --- a/examples/voice/voice-xtts.py +++ b/examples/voice/voice-xtts.py @@ -115,7 +115,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments): runner = PipelineRunner(handle_sigint=runner_args.handle_sigint) - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() async def bot(runner_args: RunnerArguments): diff --git a/src/pipecat/pipeline/runner.py b/src/pipecat/pipeline/runner.py index 90edc26ae..b161d8078 100644 --- a/src/pipecat/pipeline/runner.py +++ b/src/pipecat/pipeline/runner.py @@ -12,35 +12,36 @@ also acts as the host for spawned :class:`~pipecat.pipeline.base_worker.BaseWork instances — owning the shared :class:`~pipecat.bus.WorkerBus`, the worker registry, and the worker manager that backs the entire session. -For a typical single-pipeline bot, use :meth:`PipelineRunner.run` with the -worker: +For a typical single-pipeline bot, register the worker with +:meth:`PipelineRunner.add_workers` and then call :meth:`PipelineRunner.run`: .. code-block:: python runner = PipelineRunner() - await runner.run(worker) + await runner.add_workers(worker) + await runner.run() -``run()`` returns when ``worker`` finishes. - -For multi-worker setups, add the additional workers alongside the main one: +For multi-worker setups, register every worker the same way: .. code-block:: python runner = PipelineRunner() - await runner.add_workers(CodeWorker("code_worker", ...)) - await runner.run(worker) + await runner.add_workers(CodeWorker("code_worker", ...), worker) + await runner.run() -Optionally, ``add_workers`` every worker (including the main pipeline) and call -``run()`` with no argument. In that form ``run()`` blocks until -:meth:`PipelineRunner.end` / :meth:`PipelineRunner.cancel` is called (or an -incoming ``BusEndMessage`` / ``BusCancelMessage`` triggers the same path) — -added workers finishing on their own does **not** unblock it. +``run()`` blocks until :meth:`PipelineRunner.end` / +:meth:`PipelineRunner.cancel` is called (or an incoming ``BusEndMessage`` / +``BusCancelMessage`` triggers the same path). Added workers finishing on +their own does **not** unblock it — use ``end()`` / ``cancel()`` from an +event handler (e.g. when the transport disconnects) to shut the runner +down. """ import asyncio import gc import signal import uuid +import warnings from dataclasses import dataclass, field from loguru import logger @@ -84,12 +85,13 @@ class PipelineRunner(BaseObject, BusSubscriber): Two entry points: - - :meth:`run(worker)` — block until the given pipeline worker finishes. - The most common case for a single-pipeline bot. - :meth:`add_workers(*workers)` — register one or more workers on the - runner's bus and start them in the background. Added workers run - alongside the main worker and are cancelled when the main worker - finishes (or when :meth:`end` / :meth:`cancel` is called). + runner's bus and start them in the background. Workers run + concurrently and are cancelled when :meth:`end` / :meth:`cancel` + is called. + - :meth:`run` — block until :meth:`end` / :meth:`cancel` is called + (or until an incoming ``BusEndMessage`` / ``BusCancelMessage`` + triggers the same path). Event handlers available: @@ -183,25 +185,32 @@ class PipelineRunner(BaseObject, BusSubscriber): await self._start_worker(entry) async def run(self, worker: PipelineWorker | None = None) -> None: - """Run a pipeline worker to completion (optionally alongside added workers). + """Run all added workers until the runner is stopped. - If ``worker`` is provided, blocks until that worker finishes. Any - added workers are started in the background and cancelled - when the main worker finishes. - - If ``worker`` is None, blocks until :meth:`end` or :meth:`cancel` - is called (or until an incoming ``BusEndMessage`` / - ``BusCancelMessage`` triggers the same path). Added workers - finishing on their own does **not** unblock the runner — use - this form for hosts that have no single "main" pipeline and - want to stay up across many spawned sessions (e.g. a FastAPI - server). If you want the runner to finish when a specific - pipeline finishes, pass that pipeline as ``worker``. + Blocks until :meth:`end` or :meth:`cancel` is called (or until an + incoming ``BusEndMessage`` / ``BusCancelMessage`` triggers the + same path). Added workers finishing on their own does **not** + unblock the runner — call ``end()`` / ``cancel()`` from an + event handler (e.g. when the transport disconnects) to shut the + runner down. Args: - worker: The pipeline worker to run, or None. + worker: Optional pipeline worker to run. + + .. deprecated:: 1.3.0 + Register the worker with :meth:`add_workers` before + calling ``run()`` instead. Passing ``worker`` here + will be removed in a future release. """ - logger.debug(f"PipelineRunner '{self}': started running {worker}") + if worker is not None: + warnings.warn( + "Passing a worker to PipelineRunner.run() is deprecated; " + "register it with PipelineRunner.add_workers() before calling run() instead.", + DeprecationWarning, + stacklevel=2, + ) + + logger.debug(f"PipelineRunner '{self}': started running") self._shutdown_event.clear() # Treat the main worker as any other added worker: ``add_workers`` attaches @@ -242,7 +251,7 @@ class PipelineRunner(BaseObject, BusSubscriber): if self._force_gc: await self._gc_collect() - logger.debug(f"PipelineRunner '{self}': finished running {worker}") + logger.debug(f"PipelineRunner '{self}': finished running") async def stop_when_done(self) -> None: """Schedule all root pipeline workers to stop when their current processing is complete.""" diff --git a/src/pipecat/tests/utils.py b/src/pipecat/tests/utils.py index cd0caa4a9..421a99ad8 100644 --- a/src/pipecat/tests/utils.py +++ b/src/pipecat/tests/utils.py @@ -198,7 +198,8 @@ async def run_test( await worker.queue_frame(EndFrame()) runner = PipelineRunner() - await asyncio.gather(runner.run(worker), push_frames()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), push_frames()) # # Down frames diff --git a/tests/test_base_worker.py b/tests/test_base_worker.py index 6add7c4bd..190f20d53 100644 --- a/tests/test_base_worker.py +++ b/tests/test_base_worker.py @@ -129,7 +129,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), handoff_after_start()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), handoff_after_start()) self.assertTrue(worker.active) self.assertEqual(len(handoff_args_received), 1) @@ -150,7 +151,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), wait_and_end()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), wait_and_end()) self.assertTrue(worker.active) self.assertTrue(activated.is_set()) @@ -186,7 +188,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), drive()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), drive()) self.assertTrue(observed_while_active["active"]) self.assertEqual(observed_while_active["args"], args) @@ -291,7 +294,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), wait_and_end()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), wait_and_end()) async def test_on_pipeline_started_event(self): """on_pipeline_started fires after pipeline starts.""" @@ -308,7 +312,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), wait_and_end()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), wait_and_end()) self.assertTrue(started.is_set()) @@ -327,7 +332,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), end_pipeline()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), end_pipeline()) self.assertTrue(finished_fired.is_set()) @@ -361,7 +367,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): ) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), send_end_message()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), send_end_message()) self.assertTrue(finished.is_set()) @@ -375,7 +382,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): runner = PipelineRunner(bus=self.bus, handle_sigint=False) try: - await asyncio.gather(runner.run(worker), send_cancel_message()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), send_cancel_message()) except asyncio.CancelledError: pass @@ -399,7 +407,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), push_frames()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), push_frames()) self.assertEqual(len(received), 1) self.assertEqual(received[0].text, "injected") @@ -422,7 +431,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), push_frames()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), push_frames()) self.assertEqual(len(received), 2) self.assertEqual(received[0].text, "a") @@ -447,7 +457,8 @@ class TestPipelineTaskLifecycle(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), self_handoff()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), self_handoff()) self.assertTrue(worker.active) @@ -564,7 +575,8 @@ class TestEdgeToBus(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), push_frames()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), push_frames()) bus_frame_msgs = [m for m in sent if isinstance(m, BusFrameMessage)] text_msgs = [m for m in bus_frame_msgs if isinstance(m.frame, TextFrame)] @@ -592,7 +604,8 @@ class TestEdgeToBus(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), inject_frame()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), inject_frame()) # The frame passes through the identity pipeline and reaches # EdgeSink, which re-broadcasts with source="worker". That's @@ -623,7 +636,8 @@ class TestEdgeToBus(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), push_frames()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), push_frames()) bus_frame_msgs = [m for m in sent if isinstance(m, BusFrameMessage)] self.assertEqual(len(bus_frame_msgs), 0) @@ -652,7 +666,8 @@ class TestEdgeToBus(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), inject_frame()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), inject_frame()) self.assertEqual(len(received), 1) self.assertEqual(received[0].text, "from_bus") @@ -670,7 +685,8 @@ class TestEdgeToBus(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), push_frames()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), push_frames()) bus_frame_msgs = [m for m in sent if isinstance(m, BusFrameMessage)] text_msgs = [m for m in bus_frame_msgs if isinstance(m.frame, TextFrame)] @@ -703,7 +719,8 @@ class TestEdgeToBus(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), inject_frame()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), inject_frame()) self.assertEqual(len(received), 1) self.assertEqual(received[0].text, "voice_frame") @@ -733,7 +750,8 @@ class TestEdgeToBus(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), inject_frame()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), inject_frame()) self.assertEqual(len(received), 0) @@ -777,7 +795,8 @@ class TestEdgeToBus(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), inject_frames()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), inject_frames()) self.assertEqual(len(received), 3) @@ -822,7 +841,8 @@ class TestEdgeToBus(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), inject_frames()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), inject_frames()) texts = sorted([r.text for r in received]) self.assertEqual(texts, ["video", "voice"]) @@ -840,7 +860,8 @@ class TestEdgeToBus(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner(bus=self.bus, handle_sigint=False) - await asyncio.gather(runner.run(worker), push_frames()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), push_frames()) bus_frame_msgs = [m for m in sent if isinstance(m, BusFrameMessage)] self.assertEqual(len(bus_frame_msgs), 0) diff --git a/tests/test_bridge_processor.py b/tests/test_bridge_processor.py index 5279412a4..3084f6c48 100644 --- a/tests/test_bridge_processor.py +++ b/tests/test_bridge_processor.py @@ -165,7 +165,8 @@ class TestBusBridgeProcessor(unittest.IsolatedAsyncioTestCase): await worker.queue_frame(EndFrame()) runner = PipelineRunner() - await asyncio.gather(runner.run(worker), inject_and_end()) + await runner.add_workers(worker) + await asyncio.gather(runner.run(), inject_and_end()) texts = [f.text for f in received if isinstance(f, TextFrame)] self.assertIn("from_child", texts)