Merge pull request #2987 from pipecat-ai/filipi/fix_start_endpoint
Fixing the runner start endpoint when enableDefaultIceServers is enabled.
This commit is contained in:
@@ -74,7 +74,7 @@ import uuid
|
|||||||
from contextlib import asynccontextmanager
|
from contextlib import asynccontextmanager
|
||||||
from http import HTTPMethod
|
from http import HTTPMethod
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Dict, List, Optional, TypedDict
|
from typing import Any, Dict, List, Optional, TypedDict, Union
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
from fastapi.responses import FileResponse, Response
|
from fastapi.responses import FileResponse, Response
|
||||||
@@ -205,7 +205,7 @@ def _setup_webrtc_routes(
|
|||||||
try:
|
try:
|
||||||
from pipecat_ai_small_webrtc_prebuilt.frontend import SmallWebRTCPrebuiltUI
|
from pipecat_ai_small_webrtc_prebuilt.frontend import SmallWebRTCPrebuiltUI
|
||||||
|
|
||||||
from pipecat.transports.smallwebrtc.connection import IceServer, SmallWebRTCConnection
|
from pipecat.transports.smallwebrtc.connection import SmallWebRTCConnection
|
||||||
from pipecat.transports.smallwebrtc.request_handler import (
|
from pipecat.transports.smallwebrtc.request_handler import (
|
||||||
IceCandidate,
|
IceCandidate,
|
||||||
SmallWebRTCPatchRequest,
|
SmallWebRTCPatchRequest,
|
||||||
@@ -216,6 +216,9 @@ def _setup_webrtc_routes(
|
|||||||
logger.error(f"WebRTC transport dependencies not installed: {e}")
|
logger.error(f"WebRTC transport dependencies not installed: {e}")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
class IceServer(TypedDict, total=False):
|
||||||
|
urls: Union[str, List[str]]
|
||||||
|
|
||||||
class IceConfig(TypedDict):
|
class IceConfig(TypedDict):
|
||||||
iceServers: List[IceServer]
|
iceServers: List[IceServer]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user