diff --git a/src/blaxel/livekit/__init__.py b/src/blaxel/livekit/__init__.py index d0bdb54f..b600474e 100644 --- a/src/blaxel/livekit/__init__.py +++ b/src/blaxel/livekit/__init__.py @@ -1,4 +1,10 @@ """Blaxel LiveKit integration module.""" -from .model import * # noqa: F403, F401 -from .tools import * # noqa: F403, F401 +try: + from .model import * # noqa: F403, F401 + from .tools import * # noqa: F403, F401 +except ImportError as e: + raise ImportError( + "The livekit extra dependencies are required to use the LiveKit integration. " + "Install them with: pip install blaxel[livekit]" + ) from e diff --git a/src/blaxel/openai/__init__.py b/src/blaxel/openai/__init__.py index 2f04c5c7..9be48d2c 100644 --- a/src/blaxel/openai/__init__.py +++ b/src/blaxel/openai/__init__.py @@ -1,4 +1,10 @@ """Blaxel OpenAI integration module.""" -from .model import * # noqa: F403, F401 -from .tools import * # noqa: F403, F401 +try: + from .model import * # noqa: F403, F401 + from .tools import * # noqa: F403, F401 +except ImportError as e: + raise ImportError( + "The openai extra dependencies are required to use the OpenAI Agents integration. " + "Install them with: pip install blaxel[openai]" + ) from e