From 0c3c26b7b87863ecc79f148ad394adc4f939a31b Mon Sep 17 00:00:00 2001 From: Filipi Fuchter Date: Mon, 17 Nov 2025 15:20:09 -0300 Subject: [PATCH] Passing the custom request_data to the SmallWebRTCRunnerArguments body. --- src/pipecat/runner/run.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pipecat/runner/run.py b/src/pipecat/runner/run.py index 55c70ed8a..ebca467df 100644 --- a/src/pipecat/runner/run.py +++ b/src/pipecat/runner/run.py @@ -264,7 +264,10 @@ def _setup_webrtc_routes( # Prepare runner arguments with the callback to run your bot async def webrtc_connection_callback(connection): bot_module = _get_bot_module() - runner_args = SmallWebRTCRunnerArguments(webrtc_connection=connection) + + runner_args = SmallWebRTCRunnerArguments( + webrtc_connection=connection, body=request.request_data + ) background_tasks.add_task(bot_module.bot, runner_args) # Delegate handling to SmallWebRTCRequestHandler @@ -326,7 +329,8 @@ def _setup_webrtc_routes( type=request_data["type"], pc_id=request_data.get("pc_id"), restart_pc=request_data.get("restart_pc"), - request_data=request_data, + request_data=request_data.get("request_data") + or request_data.get("requestData"), ) return await offer(webrtc_request, background_tasks) elif request.method == HTTPMethod.PATCH.value: