The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
langchain[patch]: Migrate llms to use optional community imports (#21101)
Eugene Yurtsev9932f49b3e95
diff --git a/libs/langchain/langchain/llms/ai21.py b/libs/langchain/langchain/llms/ai21.pyindex 057f562b23..7bdb2168cd 100644--- a/libs/langchain/langchain/llms/ai21.py+++ b/libs/langchain/langchain/llms/ai21.py@@ -1,3 +1,28 @@-from langchain_community.llms.ai21 import AI21, AI21PenaltyData+from typing import TYPE_CHECKING, Any-__all__ = ["AI21PenaltyData", "AI21"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import AI21+ from langchain_community.llms.ai21 import AI21PenaltyData++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "AI21PenaltyData": "langchain_community.llms.ai21",+ "AI21": "langchain_community.llms",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "AI21PenaltyData",+ "AI21",+]diff --git a/libs/langchain/langchain/llms/aleph_alpha.py b/libs/langchain/langchain/llms/aleph_alpha.pyindex 47158e60b3..b6ec18583b 100644--- a/libs/langchain/langchain/llms/aleph_alpha.py+++ b/libs/langchain/langchain/llms/aleph_alpha.py@@ -1,3 +1,23 @@-from langchain_community.llms.aleph_alpha import AlephAlpha+from typing import TYPE_CHECKING, Any-__all__ = ["AlephAlpha"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import AlephAlpha++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"AlephAlpha": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "AlephAlpha",+]diff --git a/libs/langchain/langchain/llms/amazon_api_gateway.py b/libs/langchain/langchain/llms/amazon_api_gateway.pyindex 6d18a35154..341954ec39 100644--- a/libs/langchain/langchain/llms/amazon_api_gateway.py+++ b/libs/langchain/langchain/llms/amazon_api_gateway.py@@ -1,5 +1,23 @@-from langchain_community.llms.amazon_api_gateway import (- AmazonAPIGateway,-)+from typing import TYPE_CHECKING, Any-__all__ = ["AmazonAPIGateway"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import AmazonAPIGateway++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"AmazonAPIGateway": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "AmazonAPIGateway",+]diff --git a/libs/langchain/langchain/llms/anthropic.py b/libs/langchain/langchain/llms/anthropic.pyindex 425d0906e9..3880d5c57b 100644--- a/libs/langchain/langchain/llms/anthropic.py+++ b/libs/langchain/langchain/llms/anthropic.py@@ -1,3 +1,23 @@-from langchain_community.llms.anthropic import Anthropic+from typing import TYPE_CHECKING, Any-__all__ = ["Anthropic"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Anthropic++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Anthropic": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Anthropic",+]diff --git a/libs/langchain/langchain/llms/anyscale.py b/libs/langchain/langchain/llms/anyscale.pyindex f5644089f5..b0b8359a6d 100644--- a/libs/langchain/langchain/llms/anyscale.py+++ b/libs/langchain/langchain/llms/anyscale.py@@ -1,5 +1,23 @@-from langchain_community.llms.anyscale import (- Anyscale,-)+from typing import TYPE_CHECKING, Any-__all__ = ["Anyscale"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Anyscale++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Anyscale": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Anyscale",+]diff --git a/libs/langchain/langchain/llms/arcee.py b/libs/langchain/langchain/llms/arcee.pyindex f291f2e5ff..723b4e13fb 100644--- a/libs/langchain/langchain/llms/arcee.py+++ b/libs/langchain/langchain/llms/arcee.py@@ -1,3 +1,23 @@-from langchain_community.llms.arcee import Arcee+from typing import TYPE_CHECKING, Any-__all__ = ["Arcee"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Arcee++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Arcee": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Arcee",+]diff --git a/libs/langchain/langchain/llms/aviary.py b/libs/langchain/langchain/llms/aviary.pyindex 386f41b497..b8d706f8b4 100644--- a/libs/langchain/langchain/llms/aviary.py+++ b/libs/langchain/langchain/llms/aviary.py@@ -1,5 +1,23 @@-from langchain_community.llms.aviary import (- Aviary,-)+from typing import TYPE_CHECKING, Any-__all__ = ["Aviary"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Aviary++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Aviary": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Aviary",+]diff --git a/libs/langchain/langchain/llms/azureml_endpoint.py b/libs/langchain/langchain/llms/azureml_endpoint.pyindex ce9cd07cf6..6b47cfbb87 100644--- a/libs/langchain/langchain/llms/azureml_endpoint.py+++ b/libs/langchain/langchain/llms/azureml_endpoint.py@@ -1,13 +1,40 @@-from langchain_community.llms.azureml_endpoint import (- AzureMLEndpointClient,- AzureMLOnlineEndpoint,- ContentFormatterBase,- CustomOpenAIContentFormatter,- DollyContentFormatter,- GPT2ContentFormatter,- HFContentFormatter,- OSSContentFormatter,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import AzureMLOnlineEndpoint+ from langchain_community.llms.azureml_endpoint import (+ AzureMLEndpointClient,+ ContentFormatterBase,+ CustomOpenAIContentFormatter,+ DollyContentFormatter,+ GPT2ContentFormatter,+ HFContentFormatter,+ OSSContentFormatter,+ )++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "AzureMLEndpointClient": "langchain_community.llms.azureml_endpoint",+ "ContentFormatterBase": "langchain_community.llms.azureml_endpoint",+ "GPT2ContentFormatter": "langchain_community.llms.azureml_endpoint",+ "OSSContentFormatter": "langchain_community.llms.azureml_endpoint",+ "HFContentFormatter": "langchain_community.llms.azureml_endpoint",+ "DollyContentFormatter": "langchain_community.llms.azureml_endpoint",+ "CustomOpenAIContentFormatter": "langchain_community.llms.azureml_endpoint",+ "AzureMLOnlineEndpoint": "langchain_community.llms",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["AzureMLEndpointClient",diff --git a/libs/langchain/langchain/llms/baidu_qianfan_endpoint.py b/libs/langchain/langchain/llms/baidu_qianfan_endpoint.pyindex 8776142d2b..b44ba195a1 100644--- a/libs/langchain/langchain/llms/baidu_qianfan_endpoint.py+++ b/libs/langchain/langchain/llms/baidu_qianfan_endpoint.py@@ -1,3 +1,23 @@-from langchain_community.llms.baidu_qianfan_endpoint import QianfanLLMEndpoint+from typing import TYPE_CHECKING, Any-__all__ = ["QianfanLLMEndpoint"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import QianfanLLMEndpoint++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"QianfanLLMEndpoint": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "QianfanLLMEndpoint",+]diff --git a/libs/langchain/langchain/llms/bananadev.py b/libs/langchain/langchain/llms/bananadev.pyindex c30078e33d..6c4489cdab 100644--- a/libs/langchain/langchain/llms/bananadev.py+++ b/libs/langchain/langchain/llms/bananadev.py@@ -1,3 +1,23 @@-from langchain_community.llms.bananadev import Banana+from typing import TYPE_CHECKING, Any-__all__ = ["Banana"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Banana++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Banana": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Banana",+]diff --git a/libs/langchain/langchain/llms/baseten.py b/libs/langchain/langchain/llms/baseten.pyindex 750b25ff65..983079f4af 100644--- a/libs/langchain/langchain/llms/baseten.py+++ b/libs/langchain/langchain/llms/baseten.py@@ -1,3 +1,23 @@-from langchain_community.llms.baseten import Baseten+from typing import TYPE_CHECKING, Any-__all__ = ["Baseten"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Baseten++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Baseten": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Baseten",+]diff --git a/libs/langchain/langchain/llms/beam.py b/libs/langchain/langchain/llms/beam.pyindex d2ad695e22..c0c8601dd1 100644--- a/libs/langchain/langchain/llms/beam.py+++ b/libs/langchain/langchain/llms/beam.py@@ -1,3 +1,23 @@-from langchain_community.llms.beam import Beam+from typing import TYPE_CHECKING, Any-__all__ = ["Beam"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Beam++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Beam": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Beam",+]diff --git a/libs/langchain/langchain/llms/bedrock.py b/libs/langchain/langchain/llms/bedrock.pyindex 7046810e0e..052bc8a7a7 100644--- a/libs/langchain/langchain/llms/bedrock.py+++ b/libs/langchain/langchain/llms/bedrock.py@@ -1,7 +1,26 @@-from langchain_community.llms.bedrock import (- Bedrock,- BedrockBase,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Bedrock+ from langchain_community.llms.bedrock import BedrockBase++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "BedrockBase": "langchain_community.llms.bedrock",+ "Bedrock": "langchain_community.llms",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["BedrockBase",diff --git a/libs/langchain/langchain/llms/bittensor.py b/libs/langchain/langchain/llms/bittensor.pyindex 9fb0e7df5b..6b9f295afc 100644--- a/libs/langchain/langchain/llms/bittensor.py+++ b/libs/langchain/langchain/llms/bittensor.py@@ -1,3 +1,23 @@-from langchain_community.llms.bittensor import NIBittensorLLM+from typing import TYPE_CHECKING, Any-__all__ = ["NIBittensorLLM"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import NIBittensorLLM++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"NIBittensorLLM": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "NIBittensorLLM",+]diff --git a/libs/langchain/langchain/llms/cerebriumai.py b/libs/langchain/langchain/llms/cerebriumai.pyindex ace400ed27..c9ab943bc8 100644--- a/libs/langchain/langchain/llms/cerebriumai.py+++ b/libs/langchain/langchain/llms/cerebriumai.py@@ -1,3 +1,23 @@-from langchain_community.llms.cerebriumai import CerebriumAI+from typing import TYPE_CHECKING, Any-__all__ = ["CerebriumAI"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import CerebriumAI++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"CerebriumAI": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "CerebriumAI",+]diff --git a/libs/langchain/langchain/llms/chatglm.py b/libs/langchain/langchain/llms/chatglm.pyindex fbcd4b8d70..2879ea51b9 100644--- a/libs/langchain/langchain/llms/chatglm.py+++ b/libs/langchain/langchain/llms/chatglm.py@@ -1,3 +1,23 @@-from langchain_community.llms.chatglm import ChatGLM+from typing import TYPE_CHECKING, Any-__all__ = ["ChatGLM"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import ChatGLM++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"ChatGLM": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "ChatGLM",+]diff --git a/libs/langchain/langchain/llms/clarifai.py b/libs/langchain/langchain/llms/clarifai.pyindex ee3a7ea682..8c7c697573 100644--- a/libs/langchain/langchain/llms/clarifai.py+++ b/libs/langchain/langchain/llms/clarifai.py@@ -1,3 +1,23 @@-from langchain_community.llms.clarifai import Clarifai+from typing import TYPE_CHECKING, Any-__all__ = ["Clarifai"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Clarifai++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Clarifai": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Clarifai",+]diff --git a/libs/langchain/langchain/llms/cloudflare_workersai.py b/libs/langchain/langchain/llms/cloudflare_workersai.pyindex ad7951072c..13b008e084 100644--- a/libs/langchain/langchain/llms/cloudflare_workersai.py+++ b/libs/langchain/langchain/llms/cloudflare_workersai.py@@ -1,3 +1,25 @@-from langchain_community.llms.cloudflare_workersai import CloudflareWorkersAI+from typing import TYPE_CHECKING, Any-__all__ = ["CloudflareWorkersAI"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms.cloudflare_workersai import CloudflareWorkersAI++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "CloudflareWorkersAI": "langchain_community.llms.cloudflare_workersai"+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "CloudflareWorkersAI",+]diff --git a/libs/langchain/langchain/llms/cohere.py b/libs/langchain/langchain/llms/cohere.pyindex 6d1b24d8b8..7b06986251 100644--- a/libs/langchain/langchain/llms/cohere.py+++ b/libs/langchain/langchain/llms/cohere.py@@ -1,6 +1,22 @@-from langchain_community.llms.cohere import (- Cohere,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Cohere++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Cohere": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["Cohere",diff --git a/libs/langchain/langchain/llms/ctransformers.py b/libs/langchain/langchain/llms/ctransformers.pyindex 370dd6f261..1d1d8b646f 100644--- a/libs/langchain/langchain/llms/ctransformers.py+++ b/libs/langchain/langchain/llms/ctransformers.py@@ -1,3 +1,23 @@-from langchain_community.llms.ctransformers import CTransformers+from typing import TYPE_CHECKING, Any-__all__ = ["CTransformers"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import CTransformers++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"CTransformers": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "CTransformers",+]diff --git a/libs/langchain/langchain/llms/ctranslate2.py b/libs/langchain/langchain/llms/ctranslate2.pyindex 43a704e613..ec586f1e99 100644--- a/libs/langchain/langchain/llms/ctranslate2.py+++ b/libs/langchain/langchain/llms/ctranslate2.py@@ -1,3 +1,23 @@-from langchain_community.llms.ctranslate2 import CTranslate2+from typing import TYPE_CHECKING, Any-__all__ = ["CTranslate2"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import CTranslate2++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"CTranslate2": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "CTranslate2",+]diff --git a/libs/langchain/langchain/llms/databricks.py b/libs/langchain/langchain/llms/databricks.pyindex bcf55b35eb..f9a79417b1 100644--- a/libs/langchain/langchain/llms/databricks.py+++ b/libs/langchain/langchain/llms/databricks.py@@ -1,6 +1,22 @@-from langchain_community.llms.databricks import (- Databricks,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Databricks++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Databricks": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["Databricks",diff --git a/libs/langchain/langchain/llms/deepinfra.py b/libs/langchain/langchain/llms/deepinfra.pyindex 35cb21c585..6f15884f50 100644--- a/libs/langchain/langchain/llms/deepinfra.py+++ b/libs/langchain/langchain/llms/deepinfra.py@@ -1,6 +1,22 @@-from langchain_community.llms.deepinfra import (- DeepInfra,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import DeepInfra++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"DeepInfra": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["DeepInfra",diff --git a/libs/langchain/langchain/llms/deepsparse.py b/libs/langchain/langchain/llms/deepsparse.pyindex c5a8a69d48..6de9260c6b 100644--- a/libs/langchain/langchain/llms/deepsparse.py+++ b/libs/langchain/langchain/llms/deepsparse.py@@ -1,3 +1,23 @@-from langchain_community.llms.deepsparse import DeepSparse+from typing import TYPE_CHECKING, Any-__all__ = ["DeepSparse"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import DeepSparse++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"DeepSparse": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "DeepSparse",+]diff --git a/libs/langchain/langchain/llms/edenai.py b/libs/langchain/langchain/llms/edenai.pyindex 1a00f0517e..c57c078b86 100644--- a/libs/langchain/langchain/llms/edenai.py+++ b/libs/langchain/langchain/llms/edenai.py@@ -1,3 +1,23 @@-from langchain_community.llms.edenai import EdenAI+from typing import TYPE_CHECKING, Any-__all__ = ["EdenAI"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import EdenAI++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"EdenAI": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "EdenAI",+]diff --git a/libs/langchain/langchain/llms/fake.py b/libs/langchain/langchain/llms/fake.pyindex 4cf3466767..a756a3a53f 100644--- a/libs/langchain/langchain/llms/fake.py+++ b/libs/langchain/langchain/llms/fake.py@@ -1,3 +1,28 @@-from langchain_community.llms.fake import FakeListLLM, FakeStreamingListLLM+from typing import TYPE_CHECKING, Any-__all__ = ["FakeListLLM", "FakeStreamingListLLM"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import FakeListLLM+ from langchain_community.llms.fake import FakeStreamingListLLM++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "FakeListLLM": "langchain_community.llms",+ "FakeStreamingListLLM": "langchain_community.llms.fake",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "FakeListLLM",+ "FakeStreamingListLLM",+]diff --git a/libs/langchain/langchain/llms/fireworks.py b/libs/langchain/langchain/llms/fireworks.pyindex d9b5b96713..1b779f4a1c 100644--- a/libs/langchain/langchain/llms/fireworks.py+++ b/libs/langchain/langchain/llms/fireworks.py@@ -1,6 +1,22 @@-from langchain_community.llms.fireworks import (- Fireworks,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Fireworks++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Fireworks": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["Fireworks",diff --git a/libs/langchain/langchain/llms/forefrontai.py b/libs/langchain/langchain/llms/forefrontai.pyindex 1d9e99e146..7fafd6facb 100644--- a/libs/langchain/langchain/llms/forefrontai.py+++ b/libs/langchain/langchain/llms/forefrontai.py@@ -1,3 +1,23 @@-from langchain_community.llms.forefrontai import ForefrontAI+from typing import TYPE_CHECKING, Any-__all__ = ["ForefrontAI"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import ForefrontAI++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"ForefrontAI": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "ForefrontAI",+]diff --git a/libs/langchain/langchain/llms/gigachat.py b/libs/langchain/langchain/llms/gigachat.pyindex d85966035a..07723da353 100644--- a/libs/langchain/langchain/llms/gigachat.py+++ b/libs/langchain/langchain/llms/gigachat.py@@ -1,3 +1,23 @@-from langchain_community.llms.gigachat import GigaChat+from typing import TYPE_CHECKING, Any-__all__ = ["GigaChat"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import GigaChat++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"GigaChat": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "GigaChat",+]diff --git a/libs/langchain/langchain/llms/google_palm.py b/libs/langchain/langchain/llms/google_palm.pyindex fa3e3bcf64..946113e9d8 100644--- a/libs/langchain/langchain/llms/google_palm.py+++ b/libs/langchain/langchain/llms/google_palm.py@@ -1,3 +1,23 @@-from langchain_community.llms.google_palm import GooglePalm+from typing import TYPE_CHECKING, Any-__all__ = ["GooglePalm"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import GooglePalm++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"GooglePalm": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "GooglePalm",+]diff --git a/libs/langchain/langchain/llms/gooseai.py b/libs/langchain/langchain/llms/gooseai.pyindex ba2a4249f2..52efd50fc3 100644--- a/libs/langchain/langchain/llms/gooseai.py+++ b/libs/langchain/langchain/llms/gooseai.py@@ -1,3 +1,23 @@-from langchain_community.llms.gooseai import GooseAI+from typing import TYPE_CHECKING, Any-__all__ = ["GooseAI"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import GooseAI++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"GooseAI": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "GooseAI",+]diff --git a/libs/langchain/langchain/llms/gpt4all.py b/libs/langchain/langchain/llms/gpt4all.pyindex 9a47af26ac..4a89d823f2 100644--- a/libs/langchain/langchain/llms/gpt4all.py+++ b/libs/langchain/langchain/llms/gpt4all.py@@ -1,3 +1,23 @@-from langchain_community.llms.gpt4all import GPT4All+from typing import TYPE_CHECKING, Any-__all__ = ["GPT4All"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import GPT4All++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"GPT4All": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "GPT4All",+]diff --git a/libs/langchain/langchain/llms/gradient_ai.py b/libs/langchain/langchain/llms/gradient_ai.pyindex 05a950b733..83dbd68697 100644--- a/libs/langchain/langchain/llms/gradient_ai.py+++ b/libs/langchain/langchain/llms/gradient_ai.py@@ -1,3 +1,28 @@-from langchain_community.llms.gradient_ai import GradientLLM, TrainResult+from typing import TYPE_CHECKING, Any-__all__ = ["TrainResult", "GradientLLM"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import GradientLLM+ from langchain_community.llms.gradient_ai import TrainResult++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "TrainResult": "langchain_community.llms.gradient_ai",+ "GradientLLM": "langchain_community.llms",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "TrainResult",+ "GradientLLM",+]diff --git a/libs/langchain/langchain/llms/huggingface_endpoint.py b/libs/langchain/langchain/llms/huggingface_endpoint.pyindex dde6a77898..2faa5c3269 100644--- a/libs/langchain/langchain/llms/huggingface_endpoint.py+++ b/libs/langchain/langchain/llms/huggingface_endpoint.py@@ -1,5 +1,23 @@-from langchain_community.llms.huggingface_endpoint import (- HuggingFaceEndpoint,-)+from typing import TYPE_CHECKING, Any-__all__ = ["HuggingFaceEndpoint"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import HuggingFaceEndpoint++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"HuggingFaceEndpoint": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "HuggingFaceEndpoint",+]diff --git a/libs/langchain/langchain/llms/huggingface_hub.py b/libs/langchain/langchain/llms/huggingface_hub.pyindex 80d3f6d326..1e2d9f5ec1 100644--- a/libs/langchain/langchain/llms/huggingface_hub.py+++ b/libs/langchain/langchain/llms/huggingface_hub.py@@ -1,5 +1,23 @@-from langchain_community.llms.huggingface_hub import (- HuggingFaceHub,-)+from typing import TYPE_CHECKING, Any-__all__ = ["HuggingFaceHub"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import HuggingFaceHub++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"HuggingFaceHub": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "HuggingFaceHub",+]diff --git a/libs/langchain/langchain/llms/huggingface_pipeline.py b/libs/langchain/langchain/llms/huggingface_pipeline.pyindex d69f5e9011..1919595c56 100644--- a/libs/langchain/langchain/llms/huggingface_pipeline.py+++ b/libs/langchain/langchain/llms/huggingface_pipeline.py@@ -1,6 +1,22 @@-from langchain_community.llms.huggingface_pipeline import (- HuggingFacePipeline,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import HuggingFacePipeline++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"HuggingFacePipeline": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["HuggingFacePipeline",diff --git a/libs/langchain/langchain/llms/huggingface_text_gen_inference.py b/libs/langchain/langchain/llms/huggingface_text_gen_inference.pyindex c484279846..524ee8171e 100644--- a/libs/langchain/langchain/llms/huggingface_text_gen_inference.py+++ b/libs/langchain/langchain/llms/huggingface_text_gen_inference.py@@ -1,5 +1,23 @@-from langchain_community.llms.huggingface_text_gen_inference import (- HuggingFaceTextGenInference,-)+from typing import TYPE_CHECKING, Any-__all__ = ["HuggingFaceTextGenInference"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import HuggingFaceTextGenInference++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"HuggingFaceTextGenInference": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "HuggingFaceTextGenInference",+]diff --git a/libs/langchain/langchain/llms/human.py b/libs/langchain/langchain/llms/human.pyindex 3eeafb9cd3..b534606762 100644--- a/libs/langchain/langchain/llms/human.py+++ b/libs/langchain/langchain/llms/human.py@@ -1,5 +1,23 @@-from langchain_community.llms.human import (- HumanInputLLM,-)+from typing import TYPE_CHECKING, Any-__all__ = ["HumanInputLLM"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import HumanInputLLM++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"HumanInputLLM": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "HumanInputLLM",+]diff --git a/libs/langchain/langchain/llms/javelin_ai_gateway.py b/libs/langchain/langchain/llms/javelin_ai_gateway.pyindex 037b659ad0..952e968a70 100644--- a/libs/langchain/langchain/llms/javelin_ai_gateway.py+++ b/libs/langchain/langchain/llms/javelin_ai_gateway.py@@ -1,3 +1,28 @@-from langchain_community.llms.javelin_ai_gateway import JavelinAIGateway, Params+from typing import TYPE_CHECKING, Any-__all__ = ["JavelinAIGateway", "Params"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import JavelinAIGateway+ from langchain_community.llms.javelin_ai_gateway import Params++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "JavelinAIGateway": "langchain_community.llms",+ "Params": "langchain_community.llms.javelin_ai_gateway",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "JavelinAIGateway",+ "Params",+]diff --git a/libs/langchain/langchain/llms/koboldai.py b/libs/langchain/langchain/llms/koboldai.pyindex 26d10f6847..e2b94b99f4 100644--- a/libs/langchain/langchain/llms/koboldai.py+++ b/libs/langchain/langchain/llms/koboldai.py@@ -1,3 +1,23 @@-from langchain_community.llms.koboldai import KoboldApiLLM+from typing import TYPE_CHECKING, Any-__all__ = ["KoboldApiLLM"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import KoboldApiLLM++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"KoboldApiLLM": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "KoboldApiLLM",+]diff --git a/libs/langchain/langchain/llms/llamacpp.py b/libs/langchain/langchain/llms/llamacpp.pyindex 989e97f9b5..bcfbf49b3d 100644--- a/libs/langchain/langchain/llms/llamacpp.py+++ b/libs/langchain/langchain/llms/llamacpp.py@@ -1,3 +1,23 @@-from langchain_community.llms.llamacpp import LlamaCpp+from typing import TYPE_CHECKING, Any-__all__ = ["LlamaCpp"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import LlamaCpp++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"LlamaCpp": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "LlamaCpp",+]diff --git a/libs/langchain/langchain/llms/loading.py b/libs/langchain/langchain/llms/loading.pyindex f2161e9d2e..7517da6b94 100644--- a/libs/langchain/langchain/llms/loading.py+++ b/libs/langchain/langchain/llms/loading.py@@ -1,3 +1,27 @@-from langchain_community.llms.loading import load_llm, load_llm_from_config+from typing import TYPE_CHECKING, Any-__all__ = ["load_llm_from_config", "load_llm"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms.loading import load_llm, load_llm_from_config++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "load_llm_from_config": "langchain_community.llms.loading",+ "load_llm": "langchain_community.llms.loading",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "load_llm_from_config",+ "load_llm",+]diff --git a/libs/langchain/langchain/llms/manifest.py b/libs/langchain/langchain/llms/manifest.pyindex e61618d697..51b8e3c4d7 100644--- a/libs/langchain/langchain/llms/manifest.py+++ b/libs/langchain/langchain/llms/manifest.py@@ -1,3 +1,23 @@-from langchain_community.llms.manifest import ManifestWrapper+from typing import TYPE_CHECKING, Any-__all__ = ["ManifestWrapper"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import ManifestWrapper++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"ManifestWrapper": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "ManifestWrapper",+]diff --git a/libs/langchain/langchain/llms/minimax.py b/libs/langchain/langchain/llms/minimax.pyindex 61baa63433..92f78d6f63 100644--- a/libs/langchain/langchain/llms/minimax.py+++ b/libs/langchain/langchain/llms/minimax.py@@ -1,5 +1,23 @@-from langchain_community.llms.minimax import (- Minimax,-)+from typing import TYPE_CHECKING, Any-__all__ = ["Minimax"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Minimax++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Minimax": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Minimax",+]diff --git a/libs/langchain/langchain/llms/mlflow.py b/libs/langchain/langchain/llms/mlflow.pyindex 490e98cb5e..8cda29aa68 100644--- a/libs/langchain/langchain/llms/mlflow.py+++ b/libs/langchain/langchain/llms/mlflow.py@@ -1,3 +1,23 @@-from langchain_community.llms.mlflow import Mlflow+from typing import TYPE_CHECKING, Any-__all__ = ["Mlflow"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Mlflow++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Mlflow": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Mlflow",+]diff --git a/libs/langchain/langchain/llms/mlflow_ai_gateway.py b/libs/langchain/langchain/llms/mlflow_ai_gateway.pyindex 0c231a569a..889ba221bf 100644--- a/libs/langchain/langchain/llms/mlflow_ai_gateway.py+++ b/libs/langchain/langchain/llms/mlflow_ai_gateway.py@@ -1,3 +1,23 @@-from langchain_community.llms.mlflow_ai_gateway import MlflowAIGateway+from typing import TYPE_CHECKING, Any-__all__ = ["MlflowAIGateway"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import MlflowAIGateway++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"MlflowAIGateway": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "MlflowAIGateway",+]diff --git a/libs/langchain/langchain/llms/modal.py b/libs/langchain/langchain/llms/modal.pyindex 7bb77f99a5..f6c474271e 100644--- a/libs/langchain/langchain/llms/modal.py+++ b/libs/langchain/langchain/llms/modal.py@@ -1,3 +1,23 @@-from langchain_community.llms.modal import Modal+from typing import TYPE_CHECKING, Any-__all__ = ["Modal"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Modal++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Modal": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Modal",+]diff --git a/libs/langchain/langchain/llms/mosaicml.py b/libs/langchain/langchain/llms/mosaicml.pyindex 59145fac91..f4ecc6018b 100644--- a/libs/langchain/langchain/llms/mosaicml.py+++ b/libs/langchain/langchain/llms/mosaicml.py@@ -1,6 +1,22 @@-from langchain_community.llms.mosaicml import (- MosaicML,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import MosaicML++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"MosaicML": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["MosaicML",diff --git a/libs/langchain/langchain/llms/nlpcloud.py b/libs/langchain/langchain/llms/nlpcloud.pyindex e31b15e236..a2ed7afa7b 100644--- a/libs/langchain/langchain/llms/nlpcloud.py+++ b/libs/langchain/langchain/llms/nlpcloud.py@@ -1,3 +1,23 @@-from langchain_community.llms.nlpcloud import NLPCloud+from typing import TYPE_CHECKING, Any-__all__ = ["NLPCloud"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import NLPCloud++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"NLPCloud": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "NLPCloud",+]diff --git a/libs/langchain/langchain/llms/octoai_endpoint.py b/libs/langchain/langchain/llms/octoai_endpoint.pyindex 0e5aea55e1..b10a665051 100644--- a/libs/langchain/langchain/llms/octoai_endpoint.py+++ b/libs/langchain/langchain/llms/octoai_endpoint.py@@ -1,3 +1,23 @@-from langchain_community.llms.octoai_endpoint import OctoAIEndpoint+from typing import TYPE_CHECKING, Any-__all__ = ["OctoAIEndpoint"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import OctoAIEndpoint++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"OctoAIEndpoint": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "OctoAIEndpoint",+]diff --git a/libs/langchain/langchain/llms/ollama.py b/libs/langchain/langchain/llms/ollama.pyindex 03a2aa691c..12e828e7cf 100644--- a/libs/langchain/langchain/llms/ollama.py+++ b/libs/langchain/langchain/llms/ollama.py@@ -1,5 +1,23 @@-from langchain_community.llms.ollama import (- Ollama,-)+from typing import TYPE_CHECKING, Any-__all__ = ["Ollama"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Ollama++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Ollama": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Ollama",+]diff --git a/libs/langchain/langchain/llms/opaqueprompts.py b/libs/langchain/langchain/llms/opaqueprompts.pyindex 313938053a..2135d7f89c 100644--- a/libs/langchain/langchain/llms/opaqueprompts.py+++ b/libs/langchain/langchain/llms/opaqueprompts.py@@ -1,3 +1,23 @@-from langchain_community.llms.opaqueprompts import OpaquePrompts+from typing import TYPE_CHECKING, Any-__all__ = ["OpaquePrompts"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import OpaquePrompts++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"OpaquePrompts": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "OpaquePrompts",+]diff --git a/libs/langchain/langchain/llms/openai.py b/libs/langchain/langchain/llms/openai.pyindex d6ee8ef5e0..8f88b4b053 100644--- a/libs/langchain/langchain/llms/openai.py+++ b/libs/langchain/langchain/llms/openai.py@@ -1,9 +1,28 @@-from langchain_community.llms.openai import (- AzureOpenAI,- BaseOpenAI,- OpenAI,- OpenAIChat,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import AzureOpenAI, OpenAI, OpenAIChat+ from langchain_community.llms.openai import BaseOpenAI++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "BaseOpenAI": "langchain_community.llms.openai",+ "OpenAI": "langchain_community.llms",+ "AzureOpenAI": "langchain_community.llms",+ "OpenAIChat": "langchain_community.llms",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["BaseOpenAI",diff --git a/libs/langchain/langchain/llms/openllm.py b/libs/langchain/langchain/llms/openllm.pyindex c6ddc5435e..061af8b523 100644--- a/libs/langchain/langchain/llms/openllm.py+++ b/libs/langchain/langchain/llms/openllm.py@@ -1,3 +1,23 @@-from langchain_community.llms.openllm import OpenLLM+from typing import TYPE_CHECKING, Any-__all__ = ["OpenLLM"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import OpenLLM++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"OpenLLM": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "OpenLLM",+]diff --git a/libs/langchain/langchain/llms/openlm.py b/libs/langchain/langchain/llms/openlm.pyindex e8c8a1db37..9b30131a70 100644--- a/libs/langchain/langchain/llms/openlm.py+++ b/libs/langchain/langchain/llms/openlm.py@@ -1,3 +1,23 @@-from langchain_community.llms.openlm import OpenLM+from typing import TYPE_CHECKING, Any-__all__ = ["OpenLM"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import OpenLM++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"OpenLM": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "OpenLM",+]diff --git a/libs/langchain/langchain/llms/pai_eas_endpoint.py b/libs/langchain/langchain/llms/pai_eas_endpoint.pyindex 2101381175..c8b3e9fc7d 100644--- a/libs/langchain/langchain/llms/pai_eas_endpoint.py+++ b/libs/langchain/langchain/llms/pai_eas_endpoint.py@@ -1,3 +1,23 @@-from langchain_community.llms.pai_eas_endpoint import PaiEasEndpoint+from typing import TYPE_CHECKING, Any-__all__ = ["PaiEasEndpoint"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import PaiEasEndpoint++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"PaiEasEndpoint": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "PaiEasEndpoint",+]diff --git a/libs/langchain/langchain/llms/petals.py b/libs/langchain/langchain/llms/petals.pyindex d5c5b4da5c..836fdd861c 100644--- a/libs/langchain/langchain/llms/petals.py+++ b/libs/langchain/langchain/llms/petals.py@@ -1,3 +1,23 @@-from langchain_community.llms.petals import Petals+from typing import TYPE_CHECKING, Any-__all__ = ["Petals"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Petals++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Petals": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Petals",+]diff --git a/libs/langchain/langchain/llms/pipelineai.py b/libs/langchain/langchain/llms/pipelineai.pyindex 88462511a7..e8130aac3a 100644--- a/libs/langchain/langchain/llms/pipelineai.py+++ b/libs/langchain/langchain/llms/pipelineai.py@@ -1,3 +1,23 @@-from langchain_community.llms.pipelineai import PipelineAI+from typing import TYPE_CHECKING, Any-__all__ = ["PipelineAI"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import PipelineAI++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"PipelineAI": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "PipelineAI",+]diff --git a/libs/langchain/langchain/llms/predibase.py b/libs/langchain/langchain/llms/predibase.pyindex bc949b0afa..8e262a43a6 100644--- a/libs/langchain/langchain/llms/predibase.py+++ b/libs/langchain/langchain/llms/predibase.py@@ -1,3 +1,23 @@-from langchain_community.llms.predibase import Predibase+from typing import TYPE_CHECKING, Any-__all__ = ["Predibase"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Predibase++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Predibase": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Predibase",+]diff --git a/libs/langchain/langchain/llms/predictionguard.py b/libs/langchain/langchain/llms/predictionguard.pyindex 9a65658b70..2a519e60a2 100644--- a/libs/langchain/langchain/llms/predictionguard.py+++ b/libs/langchain/langchain/llms/predictionguard.py@@ -1,3 +1,23 @@-from langchain_community.llms.predictionguard import PredictionGuard+from typing import TYPE_CHECKING, Any-__all__ = ["PredictionGuard"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import PredictionGuard++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"PredictionGuard": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "PredictionGuard",+]diff --git a/libs/langchain/langchain/llms/promptlayer_openai.py b/libs/langchain/langchain/llms/promptlayer_openai.pyindex 880e0b6619..4102507846 100644--- a/libs/langchain/langchain/llms/promptlayer_openai.py+++ b/libs/langchain/langchain/llms/promptlayer_openai.py@@ -1,6 +1,27 @@-from langchain_community.llms.promptlayer_openai import (- PromptLayerOpenAI,- PromptLayerOpenAIChat,-)+from typing import TYPE_CHECKING, Any-__all__ = ["PromptLayerOpenAI", "PromptLayerOpenAIChat"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import PromptLayerOpenAI, PromptLayerOpenAIChat++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "PromptLayerOpenAI": "langchain_community.llms",+ "PromptLayerOpenAIChat": "langchain_community.llms",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "PromptLayerOpenAI",+ "PromptLayerOpenAIChat",+]diff --git a/libs/langchain/langchain/llms/replicate.py b/libs/langchain/langchain/llms/replicate.pyindex 8fce365732..05d168b3f5 100644--- a/libs/langchain/langchain/llms/replicate.py+++ b/libs/langchain/langchain/llms/replicate.py@@ -1,3 +1,23 @@-from langchain_community.llms.replicate import Replicate+from typing import TYPE_CHECKING, Any-__all__ = ["Replicate"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Replicate++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Replicate": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Replicate",+]diff --git a/libs/langchain/langchain/llms/rwkv.py b/libs/langchain/langchain/llms/rwkv.pyindex 69350d3672..153e10cd6e 100644--- a/libs/langchain/langchain/llms/rwkv.py+++ b/libs/langchain/langchain/llms/rwkv.py@@ -1,3 +1,23 @@-from langchain_community.llms.rwkv import RWKV+from typing import TYPE_CHECKING, Any-__all__ = ["RWKV"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import RWKV++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"RWKV": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "RWKV",+]diff --git a/libs/langchain/langchain/llms/sagemaker_endpoint.py b/libs/langchain/langchain/llms/sagemaker_endpoint.pyindex 1f22908c7b..101f6e6655 100644--- a/libs/langchain/langchain/llms/sagemaker_endpoint.py+++ b/libs/langchain/langchain/llms/sagemaker_endpoint.py@@ -1,6 +1,28 @@-from langchain_community.llms.sagemaker_endpoint import (- LLMContentHandler,- SagemakerEndpoint,-)+from typing import TYPE_CHECKING, Any-__all__ = ["SagemakerEndpoint", "LLMContentHandler"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import SagemakerEndpoint+ from langchain_community.llms.sagemaker_endpoint import LLMContentHandler++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "SagemakerEndpoint": "langchain_community.llms",+ "LLMContentHandler": "langchain_community.llms.sagemaker_endpoint",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "SagemakerEndpoint",+ "LLMContentHandler",+]diff --git a/libs/langchain/langchain/llms/self_hosted.py b/libs/langchain/langchain/llms/self_hosted.pyindex 0cdcbd4514..0bf213a7e5 100644--- a/libs/langchain/langchain/llms/self_hosted.py+++ b/libs/langchain/langchain/llms/self_hosted.py@@ -1,5 +1,23 @@-from langchain_community.llms.self_hosted import (- SelfHostedPipeline,-)+from typing import TYPE_CHECKING, Any-__all__ = ["SelfHostedPipeline"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import SelfHostedPipeline++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"SelfHostedPipeline": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "SelfHostedPipeline",+]diff --git a/libs/langchain/langchain/llms/self_hosted_hugging_face.py b/libs/langchain/langchain/llms/self_hosted_hugging_face.pyindex 9833af7708..13e663e1f2 100644--- a/libs/langchain/langchain/llms/self_hosted_hugging_face.py+++ b/libs/langchain/langchain/llms/self_hosted_hugging_face.py@@ -1,6 +1,22 @@-from langchain_community.llms.self_hosted_hugging_face import (- SelfHostedHuggingFaceLLM,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import SelfHostedHuggingFaceLLM++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"SelfHostedHuggingFaceLLM": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["SelfHostedHuggingFaceLLM",diff --git a/libs/langchain/langchain/llms/stochasticai.py b/libs/langchain/langchain/llms/stochasticai.pyindex 24ae9f7b2a..844d1f6139 100644--- a/libs/langchain/langchain/llms/stochasticai.py+++ b/libs/langchain/langchain/llms/stochasticai.py@@ -1,3 +1,23 @@-from langchain_community.llms.stochasticai import StochasticAI+from typing import TYPE_CHECKING, Any-__all__ = ["StochasticAI"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import StochasticAI++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"StochasticAI": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "StochasticAI",+]diff --git a/libs/langchain/langchain/llms/symblai_nebula.py b/libs/langchain/langchain/llms/symblai_nebula.pyindex c4123f3be4..de0f217efd 100644--- a/libs/langchain/langchain/llms/symblai_nebula.py+++ b/libs/langchain/langchain/llms/symblai_nebula.py@@ -1,6 +1,22 @@-from langchain_community.llms.symblai_nebula import (- Nebula,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Nebula++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Nebula": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["Nebula",diff --git a/libs/langchain/langchain/llms/textgen.py b/libs/langchain/langchain/llms/textgen.pyindex 4494d3b62e..d5f733510a 100644--- a/libs/langchain/langchain/llms/textgen.py+++ b/libs/langchain/langchain/llms/textgen.py@@ -1,3 +1,23 @@-from langchain_community.llms.textgen import TextGen+from typing import TYPE_CHECKING, Any-__all__ = ["TextGen"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import TextGen++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"TextGen": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "TextGen",+]diff --git a/libs/langchain/langchain/llms/titan_takeoff.py b/libs/langchain/langchain/llms/titan_takeoff.pyindex e166a1aa71..b34af8cece 100644--- a/libs/langchain/langchain/llms/titan_takeoff.py+++ b/libs/langchain/langchain/llms/titan_takeoff.py@@ -1,3 +1,23 @@-from langchain_community.llms.titan_takeoff import TitanTakeoff+from typing import TYPE_CHECKING, Any-__all__ = ["TitanTakeoff"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import TitanTakeoff++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"TitanTakeoff": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "TitanTakeoff",+]diff --git a/libs/langchain/langchain/llms/together.py b/libs/langchain/langchain/llms/together.pyindex 86a91be8fa..fd2bd8d823 100644--- a/libs/langchain/langchain/llms/together.py+++ b/libs/langchain/langchain/llms/together.py@@ -1,3 +1,23 @@-from langchain_community.llms.together import Together+from typing import TYPE_CHECKING, Any-__all__ = ["Together"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Together++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Together": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Together",+]diff --git a/libs/langchain/langchain/llms/tongyi.py b/libs/langchain/langchain/llms/tongyi.pyindex e113714e88..98dfddeda0 100644--- a/libs/langchain/langchain/llms/tongyi.py+++ b/libs/langchain/langchain/llms/tongyi.py@@ -1,6 +1,22 @@-from langchain_community.llms.tongyi import (- Tongyi,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Tongyi++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Tongyi": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["Tongyi",diff --git a/libs/langchain/langchain/llms/utils.py b/libs/langchain/langchain/llms/utils.pyindex a33777b7a3..0e561fd6cd 100644--- a/libs/langchain/langchain/llms/utils.py+++ b/libs/langchain/langchain/llms/utils.py@@ -1,3 +1,23 @@-from langchain_community.llms.utils import enforce_stop_tokens+from typing import TYPE_CHECKING, Any-__all__ = ["enforce_stop_tokens"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms.utils import enforce_stop_tokens++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"enforce_stop_tokens": "langchain_community.llms.utils"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "enforce_stop_tokens",+]diff --git a/libs/langchain/langchain/llms/vertexai.py b/libs/langchain/langchain/llms/vertexai.pyindex ee663b2829..e113bed9e8 100644--- a/libs/langchain/langchain/llms/vertexai.py+++ b/libs/langchain/langchain/llms/vertexai.py@@ -1,7 +1,25 @@-from langchain_community.llms.vertexai import (- VertexAI,- VertexAIModelGarden,-)+from typing import TYPE_CHECKING, Any++from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import VertexAI, VertexAIModelGarden++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "VertexAI": "langchain_community.llms",+ "VertexAIModelGarden": "langchain_community.llms",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+__all__ = ["VertexAI",diff --git a/libs/langchain/langchain/llms/vllm.py b/libs/langchain/langchain/llms/vllm.pyindex 2328d0c368..d26c0e3b01 100644--- a/libs/langchain/langchain/llms/vllm.py+++ b/libs/langchain/langchain/llms/vllm.py@@ -1,3 +1,27 @@-from langchain_community.llms.vllm import VLLM, VLLMOpenAI+from typing import TYPE_CHECKING, Any-__all__ = ["VLLM", "VLLMOpenAI"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import VLLM, VLLMOpenAI++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "VLLM": "langchain_community.llms",+ "VLLMOpenAI": "langchain_community.llms",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "VLLM",+ "VLLMOpenAI",+]diff --git a/libs/langchain/langchain/llms/volcengine_maas.py b/libs/langchain/langchain/llms/volcengine_maas.pyindex dc8a82e86e..cfee8d472e 100644--- a/libs/langchain/langchain/llms/volcengine_maas.py+++ b/libs/langchain/langchain/llms/volcengine_maas.py@@ -1,6 +1,28 @@-from langchain_community.llms.volcengine_maas import (- VolcEngineMaasBase,- VolcEngineMaasLLM,-)+from typing import TYPE_CHECKING, Any-__all__ = ["VolcEngineMaasBase", "VolcEngineMaasLLM"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import VolcEngineMaasLLM+ from langchain_community.llms.volcengine_maas import VolcEngineMaasBase++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {+ "VolcEngineMaasBase": "langchain_community.llms.volcengine_maas",+ "VolcEngineMaasLLM": "langchain_community.llms",+}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "VolcEngineMaasBase",+ "VolcEngineMaasLLM",+]diff --git a/libs/langchain/langchain/llms/watsonxllm.py b/libs/langchain/langchain/llms/watsonxllm.pyindex ba587ab700..5bbc37729f 100644--- a/libs/langchain/langchain/llms/watsonxllm.py+++ b/libs/langchain/langchain/llms/watsonxllm.py@@ -1,3 +1,23 @@-from langchain_community.llms.watsonxllm import WatsonxLLM+from typing import TYPE_CHECKING, Any-__all__ = ["WatsonxLLM"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import WatsonxLLM++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"WatsonxLLM": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "WatsonxLLM",+]diff --git a/libs/langchain/langchain/llms/writer.py b/libs/langchain/langchain/llms/writer.pyindex 0a84861bc7..091a225d98 100644--- a/libs/langchain/langchain/llms/writer.py+++ b/libs/langchain/langchain/llms/writer.py@@ -1,3 +1,23 @@-from langchain_community.llms.writer import Writer+from typing import TYPE_CHECKING, Any-__all__ = ["Writer"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Writer++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Writer": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Writer",+]diff --git a/libs/langchain/langchain/llms/xinference.py b/libs/langchain/langchain/llms/xinference.pyindex 3caaee8899..01c27d7d72 100644--- a/libs/langchain/langchain/llms/xinference.py+++ b/libs/langchain/langchain/llms/xinference.py@@ -1,3 +1,23 @@-from langchain_community.llms.xinference import Xinference+from typing import TYPE_CHECKING, Any-__all__ = ["Xinference"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import Xinference++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"Xinference": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "Xinference",+]diff --git a/libs/langchain/langchain/llms/yandex.py b/libs/langchain/langchain/llms/yandex.pyindex 4216ffeb46..9c25312deb 100644--- a/libs/langchain/langchain/llms/yandex.py+++ b/libs/langchain/langchain/llms/yandex.py@@ -1,3 +1,23 @@-from langchain_community.llms.yandex import YandexGPT+from typing import TYPE_CHECKING, Any-__all__ = ["YandexGPT"]+from langchain._api import create_importer++if TYPE_CHECKING:+ from langchain_community.llms import YandexGPT++# Create a way to dynamically look up deprecated imports.+# Used to consolidate logic for raising deprecation warnings and+# handling optional imports.+DEPRECATED_LOOKUP = {"YandexGPT": "langchain_community.llms"}++_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)+++def __getattr__(name: str) -> Any:+ """Look up attributes dynamically."""+ return _import_attribute(name)+++__all__ = [+ "YandexGPT",+]