diff --git a/libs/community/langchain_community/llms/__init__.py b/libs/community/langchain_community/llms/__init__.py index f070658a9b01d..b87e9239b64e8 100644 --- a/libs/community/langchain_community/llms/__init__.py +++ b/libs/community/langchain_community/llms/__init__.py @@ -113,6 +113,10 @@ def _import_bedrock() -> Type[BaseLLM]: return Bedrock +def _import_bigdlllm() -> Type[BaseLLM]: + from langchain_community.llms.bigdl_llm import BigdlLLM + + return BigdlLLM def _import_bittensor() -> Type[BaseLLM]: from langchain_community.llms.bittensor import NIBittensorLLM @@ -649,6 +653,8 @@ def __getattr__(name: str) -> Any: return _import_beam() elif name == "Bedrock": return _import_bedrock() + elif name == "BigdlLLM": + return _import_bigdlllm() elif name == "NIBittensorLLM": return _import_bittensor() elif name == "CerebriumAI": diff --git a/libs/community/langchain_community/llms/bigdl_llm.py b/libs/community/langchain_community/llms/bigdl_llm.py index 8feeefe109fde..28fd8fcb2b72a 100644 --- a/libs/community/langchain_community/llms/bigdl_llm.py +++ b/libs/community/langchain_community/llms/bigdl_llm.py @@ -33,6 +33,8 @@ def from_model_id( Returns: An object of BigdlLLM. """ + logger.warning("BigdlLLM was deprecated. Please use IpexLLM instead.") + try: from bigdl.llm.transformers import ( AutoModel, @@ -94,6 +96,9 @@ def from_model_id_low_bit( Returns: An object of BigdlLLM. """ + + logger.warning("BigdlLLM was deprecated. Please use IpexLLM instead.") + try: from bigdl.llm.transformers import ( AutoModel,