From 93df7044fa33e5774fde6755ea911d28b988150f Mon Sep 17 00:00:00 2001 From: Kingston Date: Sat, 13 Dec 2025 22:11:06 +0800 Subject: [PATCH] fix return type for SmallWebRTCRequestHandler --- src/pipecat/transports/smallwebrtc/request_handler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pipecat/transports/smallwebrtc/request_handler.py b/src/pipecat/transports/smallwebrtc/request_handler.py index d6ab3841d..a5e74dca6 100644 --- a/src/pipecat/transports/smallwebrtc/request_handler.py +++ b/src/pipecat/transports/smallwebrtc/request_handler.py @@ -160,7 +160,7 @@ class SmallWebRTCRequestHandler: self, request: SmallWebRTCRequest, webrtc_connection_callback: Callable[[Any], Awaitable[None]], - ) -> None: + ) -> Optional[Dict[str, str]]: """Handle a SmallWebRTC request and resolve the pending answer. This method will: @@ -176,6 +176,10 @@ class SmallWebRTCRequestHandler: webrtc_connection_callback (Callable[[Any], Awaitable[None]]): An asynchronous callback function that is invoked with the WebRTC connection. + Returns: + Dictionary containing SDP answer, type, and peer connection ID, + or None if no answer is available. + Raises: HTTPException: If connection mode constraints are violated Exception: Any exception raised during request handling or callback execution