Merge pull request #2977 from pipecat-ai/mb/request-handler-smallwebrtc
Fix: support request data in SmallWebRTC
This commit is contained in:
@@ -33,6 +33,10 @@ reason")`.
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed an issue where the `SmallWebRTCRequest` dataclass in runner would scrub
|
||||||
|
arbitrary request data from client due to camelCase typing. This fixes data
|
||||||
|
passthrough for JS clients where `APIRequest` is used.
|
||||||
|
|
||||||
- Fixed `GeminiLiveLLMService` session resumption after a connection timeout.
|
- Fixed `GeminiLiveLLMService` session resumption after a connection timeout.
|
||||||
|
|
||||||
- `GeminiLiveLLMService` now properly supports context-provided system
|
- `GeminiLiveLLMService` now properly supports context-provided system
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ class SmallWebRTCRequest:
|
|||||||
request_data: Optional[Any] = None
|
request_data: Optional[Any] = None
|
||||||
|
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls, data: dict):
|
||||||
|
"""Accept both snake_case and camelCase for the request_data field."""
|
||||||
|
if "requestData" in data and "request_data" not in data:
|
||||||
|
data["request_data"] = data.pop("requestData")
|
||||||
|
return cls(**data)
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class IceCandidate:
|
class IceCandidate:
|
||||||
"""The remote ice candidate object received from the peer connection.
|
"""The remote ice candidate object received from the peer connection.
|
||||||
|
|||||||
Reference in New Issue
Block a user