langchain[patch]: Migrate llms to use optional community imports (#21101)

This commit is contained in:
Eugene Yurtsev
2024-05-01 16:04:45 -04:00
committed by GitHub
parent 57e8e70daa
commit 9932f49b3e
80 changed files with 1796 additions and 214 deletions

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]

View File

@@ -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",
]