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