diff --git a/CHANGELOG.md b/CHANGELOG.md index 33f7fdc6b..bca4a5d6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed an issue in the `Runner` where, when using `SmallWebRTCTransport`, the + `request_data` was not being passed to the `SmallWebRTCRunnerArguments` body. + - Fixed subtle issue of assistant context messages ending up with double spaces between words or sentences. 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: