fix: adding missing livekit transport configs
This commit is contained in:
1
changelog/3580.fixed.md
Normal file
1
changelog/3580.fixed.md
Normal file
@@ -0,0 +1 @@
|
||||
- Added missing `LiveKitRunnerArguments` and `LiveKitTransport` support in runner utilities to enable LiveKit transport configuration.
|
||||
@@ -106,3 +106,18 @@ class SmallWebRTCRunnerArguments(RunnerArguments):
|
||||
"""
|
||||
|
||||
webrtc_connection: Any
|
||||
|
||||
|
||||
@dataclass
|
||||
class LiveKitRunnerArguments(RunnerArguments):
|
||||
"""LiveKit transport session arguments for the runner.
|
||||
|
||||
Parameters:
|
||||
room_name: LiveKit room name to join
|
||||
token: Authentication token for the room
|
||||
body: Additional request data
|
||||
"""
|
||||
|
||||
room_name: str
|
||||
url: str
|
||||
token: Optional[str] = None
|
||||
|
||||
@@ -39,6 +39,7 @@ from loguru import logger
|
||||
|
||||
from pipecat.runner.types import (
|
||||
DailyRunnerArguments,
|
||||
LiveKitRunnerArguments,
|
||||
SmallWebRTCRunnerArguments,
|
||||
WebSocketRunnerArguments,
|
||||
)
|
||||
@@ -568,6 +569,17 @@ async def create_transport(
|
||||
return await _create_telephony_transport(
|
||||
runner_args.websocket, params, transport_type, call_data
|
||||
)
|
||||
elif isinstance(runner_args, LiveKitRunnerArguments):
|
||||
params = _get_transport_params("livekit", transport_params)
|
||||
|
||||
from pipecat.transports.livekit.transport import LiveKitTransport
|
||||
|
||||
return LiveKitTransport(
|
||||
runner_args.url,
|
||||
runner_args.token,
|
||||
runner_args.room_name,
|
||||
params=params,
|
||||
)
|
||||
|
||||
else:
|
||||
raise ValueError(f"Unsupported runner arguments type: {type(runner_args)}")
|
||||
|
||||
Reference in New Issue
Block a user