Manual updates for unused imports
This commit is contained in:
@@ -263,7 +263,7 @@ def _setup_webrtc_routes(
|
||||
"""Handle WebRTC offer requests via SmallWebRTCRequestHandler."""
|
||||
|
||||
# Prepare runner arguments with the callback to run your bot
|
||||
async def webrtc_connection_callback(connection):
|
||||
async def webrtc_connection_callback(connection: SmallWebRTCConnection):
|
||||
bot_module = _get_bot_module()
|
||||
|
||||
runner_args = SmallWebRTCRunnerArguments(
|
||||
@@ -406,13 +406,7 @@ def _setup_whatsapp_routes(app: FastAPI):
|
||||
return
|
||||
|
||||
try:
|
||||
from pipecat_ai_small_webrtc_prebuilt.frontend import SmallWebRTCPrebuiltUI
|
||||
|
||||
from pipecat.transports.smallwebrtc.connection import SmallWebRTCConnection
|
||||
from pipecat.transports.smallwebrtc.request_handler import (
|
||||
SmallWebRTCRequest,
|
||||
SmallWebRTCRequestHandler,
|
||||
)
|
||||
from pipecat.transports.whatsapp.api import WhatsAppWebhookRequest
|
||||
from pipecat.transports.whatsapp.client import WhatsAppClient
|
||||
except ImportError as e:
|
||||
|
||||
@@ -17,3 +17,8 @@ with warnings.catch_warnings():
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"AWSNovaSonicLLMService",
|
||||
"Params",
|
||||
]
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
from .file_api import GeminiFileAPI
|
||||
from .gemini import GeminiMultimodalLiveLLMService
|
||||
|
||||
__all__ = [
|
||||
"GeminiFileAPI",
|
||||
"GeminiMultimodalLiveLLMService",
|
||||
]
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
from .file_api import GeminiFileAPI
|
||||
from .llm import GeminiLiveLLMService
|
||||
from .llm_vertex import GeminiLiveVertexLLMService
|
||||
|
||||
__all__ = [
|
||||
"GeminiFileAPI",
|
||||
"GeminiLiveLLMService",
|
||||
"GeminiLiveVertexLLMService",
|
||||
]
|
||||
|
||||
@@ -46,7 +46,7 @@ def detect_device():
|
||||
and dtype is the recommended torch data type for that device.
|
||||
"""
|
||||
try:
|
||||
import intel_extension_for_pytorch
|
||||
import intel_extension_for_pytorch # noqa: F401
|
||||
|
||||
if torch.xpu.is_available():
|
||||
return torch.device("xpu"), torch.float32
|
||||
|
||||
@@ -25,3 +25,13 @@ with warnings.catch_warnings():
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"AzureRealtimeLLMService",
|
||||
"InputAudioNoiseReduction",
|
||||
"InputAudioTranscription",
|
||||
"SemanticTurnDetection",
|
||||
"SessionProperties",
|
||||
"TurnDetection",
|
||||
"OpenAIRealtimeLLMService",
|
||||
]
|
||||
|
||||
@@ -7,3 +7,13 @@ from .events import (
|
||||
TurnDetection,
|
||||
)
|
||||
from .openai import OpenAIRealtimeBetaLLMService
|
||||
|
||||
__all__ = [
|
||||
"AzureRealtimeBetaLLMService",
|
||||
"InputAudioNoiseReduction",
|
||||
"InputAudioTranscription",
|
||||
"SemanticTurnDetection",
|
||||
"SessionProperties",
|
||||
"TurnDetection",
|
||||
"OpenAIRealtimeBetaLLMService",
|
||||
]
|
||||
|
||||
@@ -33,7 +33,7 @@ if TYPE_CHECKING:
|
||||
raise Exception(f"Missing module: {e}")
|
||||
|
||||
try:
|
||||
import mlx_whisper
|
||||
import mlx_whisper # noqa: F401
|
||||
except ModuleNotFoundError as e:
|
||||
logger.error(f"Exception: {e}")
|
||||
logger.error("In order to use Whisper, you need to `pip install pipecat-ai[mlx-whisper]`.")
|
||||
|
||||
@@ -23,7 +23,6 @@ from pipecat.utils.base_object import BaseObject
|
||||
|
||||
try:
|
||||
from aiortc import (
|
||||
MediaStreamTrack,
|
||||
RTCConfiguration,
|
||||
RTCIceServer,
|
||||
RTCPeerConnection,
|
||||
|
||||
@@ -22,3 +22,11 @@ with warnings.catch_warnings():
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"AlwaysUserMuteStrategy",
|
||||
"BaseUserMuteStrategy",
|
||||
"FirstSpeechUserMuteStrategy",
|
||||
"FunctionCallUserMuteStrategy",
|
||||
"MuteUntilFirstBotCompleteUserMuteStrategy",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user