From 0885bc9cdfd1aea6b6c8ecd115796fccf549b7b5 Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Fri, 19 Sep 2025 13:28:01 -0400 Subject: [PATCH] Lazy load SmallWebRTCRequest, SmallWebRTCRequestHandler in runner --- src/pipecat/runner/run.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pipecat/runner/run.py b/src/pipecat/runner/run.py index dfba19370..dcf0d05ad 100644 --- a/src/pipecat/runner/run.py +++ b/src/pipecat/runner/run.py @@ -78,10 +78,6 @@ from pipecat.runner.types import ( SmallWebRTCRunnerArguments, WebSocketRunnerArguments, ) -from pipecat.transports.smallwebrtc.request_handler import ( - SmallWebRTCRequest, - SmallWebRTCRequestHandler, -) try: import uvicorn @@ -186,6 +182,10 @@ def _setup_webrtc_routes(app: FastAPI, esp32_mode: bool = False, host: str = "lo from pipecat_ai_small_webrtc_prebuilt.frontend import SmallWebRTCPrebuiltUI from pipecat.transports.smallwebrtc.connection import SmallWebRTCConnection + from pipecat.transports.smallwebrtc.request_handler import ( + SmallWebRTCRequest, + SmallWebRTCRequestHandler, + ) except ImportError as e: logger.error(f"WebRTC transport dependencies not installed: {e}") return