mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-18 21:09:00 +00:00
langchain[patch]: Migrate embeddings to optional imports (#21099)
This commit is contained in:
parent
2f709d94d7
commit
59f10ab3e0
@ -12,90 +12,71 @@ from different APIs and services.
|
|||||||
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import warnings
|
from typing import TYPE_CHECKING, Any
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from langchain_core._api import LangChainDeprecationWarning
|
|
||||||
|
|
||||||
|
from langchain._api import create_importer
|
||||||
from langchain.embeddings.cache import CacheBackedEmbeddings
|
from langchain.embeddings.cache import CacheBackedEmbeddings
|
||||||
from langchain.utils.interactive_env import is_interactive_env
|
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
def __getattr__(name: str) -> Any:
|
from langchain_community.embeddings import (
|
||||||
from langchain_community import embeddings
|
AlephAlphaAsymmetricSemanticEmbedding,
|
||||||
|
AlephAlphaSymmetricSemanticEmbedding,
|
||||||
# If not in interactive env, raise warning.
|
AwaEmbeddings,
|
||||||
if not is_interactive_env():
|
AzureOpenAIEmbeddings,
|
||||||
warnings.warn(
|
BedrockEmbeddings,
|
||||||
"Importing embeddings from langchain is deprecated. Importing from "
|
BookendEmbeddings,
|
||||||
"langchain will no longer be supported as of langchain==0.2.0. "
|
ClarifaiEmbeddings,
|
||||||
"Please import from langchain-community instead:\n\n"
|
CohereEmbeddings,
|
||||||
f"`from langchain_community.embeddings import {name}`.\n\n"
|
DashScopeEmbeddings,
|
||||||
"To install langchain-community run `pip install -U langchain-community`.",
|
DatabricksEmbeddings,
|
||||||
category=LangChainDeprecationWarning,
|
DeepInfraEmbeddings,
|
||||||
|
DeterministicFakeEmbedding,
|
||||||
|
EdenAiEmbeddings,
|
||||||
|
ElasticsearchEmbeddings,
|
||||||
|
EmbaasEmbeddings,
|
||||||
|
ErnieEmbeddings,
|
||||||
|
FakeEmbeddings,
|
||||||
|
FastEmbedEmbeddings,
|
||||||
|
GooglePalmEmbeddings,
|
||||||
|
GPT4AllEmbeddings,
|
||||||
|
GradientEmbeddings,
|
||||||
|
HuggingFaceBgeEmbeddings,
|
||||||
|
HuggingFaceEmbeddings,
|
||||||
|
HuggingFaceHubEmbeddings,
|
||||||
|
HuggingFaceInferenceAPIEmbeddings,
|
||||||
|
HuggingFaceInstructEmbeddings,
|
||||||
|
InfinityEmbeddings,
|
||||||
|
JavelinAIGatewayEmbeddings,
|
||||||
|
JinaEmbeddings,
|
||||||
|
JohnSnowLabsEmbeddings,
|
||||||
|
LlamaCppEmbeddings,
|
||||||
|
LocalAIEmbeddings,
|
||||||
|
MiniMaxEmbeddings,
|
||||||
|
MlflowAIGatewayEmbeddings,
|
||||||
|
MlflowEmbeddings,
|
||||||
|
ModelScopeEmbeddings,
|
||||||
|
MosaicMLInstructorEmbeddings,
|
||||||
|
NLPCloudEmbeddings,
|
||||||
|
OctoAIEmbeddings,
|
||||||
|
OllamaEmbeddings,
|
||||||
|
OpenAIEmbeddings,
|
||||||
|
OpenVINOEmbeddings,
|
||||||
|
QianfanEmbeddingsEndpoint,
|
||||||
|
SagemakerEndpointEmbeddings,
|
||||||
|
SelfHostedEmbeddings,
|
||||||
|
SelfHostedHuggingFaceEmbeddings,
|
||||||
|
SelfHostedHuggingFaceInstructEmbeddings,
|
||||||
|
SentenceTransformerEmbeddings,
|
||||||
|
SpacyEmbeddings,
|
||||||
|
TensorflowHubEmbeddings,
|
||||||
|
VertexAIEmbeddings,
|
||||||
|
VoyageEmbeddings,
|
||||||
|
XinferenceEmbeddings,
|
||||||
)
|
)
|
||||||
|
|
||||||
return getattr(embeddings, name)
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
__all__ = [
|
|
||||||
"OpenAIEmbeddings",
|
|
||||||
"AzureOpenAIEmbeddings",
|
|
||||||
"CacheBackedEmbeddings",
|
|
||||||
"ClarifaiEmbeddings",
|
|
||||||
"CohereEmbeddings",
|
|
||||||
"DatabricksEmbeddings",
|
|
||||||
"ElasticsearchEmbeddings",
|
|
||||||
"FastEmbedEmbeddings",
|
|
||||||
"HuggingFaceEmbeddings",
|
|
||||||
"HuggingFaceInferenceAPIEmbeddings",
|
|
||||||
"InfinityEmbeddings",
|
|
||||||
"GradientEmbeddings",
|
|
||||||
"JinaEmbeddings",
|
|
||||||
"LlamaCppEmbeddings",
|
|
||||||
"HuggingFaceHubEmbeddings",
|
|
||||||
"MlflowEmbeddings",
|
|
||||||
"MlflowAIGatewayEmbeddings",
|
|
||||||
"ModelScopeEmbeddings",
|
|
||||||
"TensorflowHubEmbeddings",
|
|
||||||
"SagemakerEndpointEmbeddings",
|
|
||||||
"HuggingFaceInstructEmbeddings",
|
|
||||||
"MosaicMLInstructorEmbeddings",
|
|
||||||
"SelfHostedEmbeddings",
|
|
||||||
"SelfHostedHuggingFaceEmbeddings",
|
|
||||||
"SelfHostedHuggingFaceInstructEmbeddings",
|
|
||||||
"FakeEmbeddings",
|
|
||||||
"DeterministicFakeEmbedding",
|
|
||||||
"AlephAlphaAsymmetricSemanticEmbedding",
|
|
||||||
"AlephAlphaSymmetricSemanticEmbedding",
|
|
||||||
"SentenceTransformerEmbeddings",
|
|
||||||
"GooglePalmEmbeddings",
|
|
||||||
"MiniMaxEmbeddings",
|
|
||||||
"VertexAIEmbeddings",
|
|
||||||
"BedrockEmbeddings",
|
|
||||||
"DeepInfraEmbeddings",
|
|
||||||
"EdenAiEmbeddings",
|
|
||||||
"DashScopeEmbeddings",
|
|
||||||
"EmbaasEmbeddings",
|
|
||||||
"OctoAIEmbeddings",
|
|
||||||
"SpacyEmbeddings",
|
|
||||||
"NLPCloudEmbeddings",
|
|
||||||
"GPT4AllEmbeddings",
|
|
||||||
"XinferenceEmbeddings",
|
|
||||||
"LocalAIEmbeddings",
|
|
||||||
"AwaEmbeddings",
|
|
||||||
"HuggingFaceBgeEmbeddings",
|
|
||||||
"ErnieEmbeddings",
|
|
||||||
"JavelinAIGatewayEmbeddings",
|
|
||||||
"OllamaEmbeddings",
|
|
||||||
"QianfanEmbeddingsEndpoint",
|
|
||||||
"JohnSnowLabsEmbeddings",
|
|
||||||
"VoyageEmbeddings",
|
|
||||||
"BookendEmbeddings",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: this is in here to maintain backwards compatibility
|
# TODO: this is in here to maintain backwards compatibility
|
||||||
class HypotheticalDocumentEmbedder:
|
class HypotheticalDocumentEmbedder:
|
||||||
@ -117,3 +98,128 @@ class HypotheticalDocumentEmbedder:
|
|||||||
from langchain.chains.hyde.base import HypotheticalDocumentEmbedder as H
|
from langchain.chains.hyde.base import HypotheticalDocumentEmbedder as H
|
||||||
|
|
||||||
return H.from_llm(*args, **kwargs)
|
return H.from_llm(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {
|
||||||
|
"AlephAlphaAsymmetricSemanticEmbedding": "langchain_community.embeddings",
|
||||||
|
"AlephAlphaSymmetricSemanticEmbedding": "langchain_community.embeddings",
|
||||||
|
"AwaEmbeddings": "langchain_community.embeddings",
|
||||||
|
"AzureOpenAIEmbeddings": "langchain_community.embeddings",
|
||||||
|
"BedrockEmbeddings": "langchain_community.embeddings",
|
||||||
|
"BookendEmbeddings": "langchain_community.embeddings",
|
||||||
|
"ClarifaiEmbeddings": "langchain_community.embeddings",
|
||||||
|
"CohereEmbeddings": "langchain_community.embeddings",
|
||||||
|
"DashScopeEmbeddings": "langchain_community.embeddings",
|
||||||
|
"DatabricksEmbeddings": "langchain_community.embeddings",
|
||||||
|
"DeepInfraEmbeddings": "langchain_community.embeddings",
|
||||||
|
"DeterministicFakeEmbedding": "langchain_community.embeddings",
|
||||||
|
"EdenAiEmbeddings": "langchain_community.embeddings",
|
||||||
|
"ElasticsearchEmbeddings": "langchain_community.embeddings",
|
||||||
|
"EmbaasEmbeddings": "langchain_community.embeddings",
|
||||||
|
"ErnieEmbeddings": "langchain_community.embeddings",
|
||||||
|
"FakeEmbeddings": "langchain_community.embeddings",
|
||||||
|
"FastEmbedEmbeddings": "langchain_community.embeddings",
|
||||||
|
"GooglePalmEmbeddings": "langchain_community.embeddings",
|
||||||
|
"GPT4AllEmbeddings": "langchain_community.embeddings",
|
||||||
|
"GradientEmbeddings": "langchain_community.embeddings",
|
||||||
|
"HuggingFaceBgeEmbeddings": "langchain_community.embeddings",
|
||||||
|
"HuggingFaceEmbeddings": "langchain_community.embeddings",
|
||||||
|
"HuggingFaceHubEmbeddings": "langchain_community.embeddings",
|
||||||
|
"HuggingFaceInferenceAPIEmbeddings": "langchain_community.embeddings",
|
||||||
|
"HuggingFaceInstructEmbeddings": "langchain_community.embeddings",
|
||||||
|
"InfinityEmbeddings": "langchain_community.embeddings",
|
||||||
|
"JavelinAIGatewayEmbeddings": "langchain_community.embeddings",
|
||||||
|
"JinaEmbeddings": "langchain_community.embeddings",
|
||||||
|
"JohnSnowLabsEmbeddings": "langchain_community.embeddings",
|
||||||
|
"LlamaCppEmbeddings": "langchain_community.embeddings",
|
||||||
|
"LocalAIEmbeddings": "langchain_community.embeddings",
|
||||||
|
"MiniMaxEmbeddings": "langchain_community.embeddings",
|
||||||
|
"MlflowAIGatewayEmbeddings": "langchain_community.embeddings",
|
||||||
|
"MlflowEmbeddings": "langchain_community.embeddings",
|
||||||
|
"ModelScopeEmbeddings": "langchain_community.embeddings",
|
||||||
|
"MosaicMLInstructorEmbeddings": "langchain_community.embeddings",
|
||||||
|
"NLPCloudEmbeddings": "langchain_community.embeddings",
|
||||||
|
"OctoAIEmbeddings": "langchain_community.embeddings",
|
||||||
|
"OllamaEmbeddings": "langchain_community.embeddings",
|
||||||
|
"OpenAIEmbeddings": "langchain_community.embeddings",
|
||||||
|
"OpenVINOEmbeddings": "langchain_community.embeddings",
|
||||||
|
"QianfanEmbeddingsEndpoint": "langchain_community.embeddings",
|
||||||
|
"SagemakerEndpointEmbeddings": "langchain_community.embeddings",
|
||||||
|
"SelfHostedEmbeddings": "langchain_community.embeddings",
|
||||||
|
"SelfHostedHuggingFaceEmbeddings": "langchain_community.embeddings",
|
||||||
|
"SelfHostedHuggingFaceInstructEmbeddings": "langchain_community.embeddings",
|
||||||
|
"SentenceTransformerEmbeddings": "langchain_community.embeddings",
|
||||||
|
"SpacyEmbeddings": "langchain_community.embeddings",
|
||||||
|
"TensorflowHubEmbeddings": "langchain_community.embeddings",
|
||||||
|
"VertexAIEmbeddings": "langchain_community.embeddings",
|
||||||
|
"VoyageEmbeddings": "langchain_community.embeddings",
|
||||||
|
"XinferenceEmbeddings": "langchain_community.embeddings",
|
||||||
|
}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"AlephAlphaAsymmetricSemanticEmbedding",
|
||||||
|
"AlephAlphaSymmetricSemanticEmbedding",
|
||||||
|
"AwaEmbeddings",
|
||||||
|
"AzureOpenAIEmbeddings",
|
||||||
|
"BedrockEmbeddings",
|
||||||
|
"BookendEmbeddings",
|
||||||
|
"CacheBackedEmbeddings",
|
||||||
|
"ClarifaiEmbeddings",
|
||||||
|
"CohereEmbeddings",
|
||||||
|
"DashScopeEmbeddings",
|
||||||
|
"DatabricksEmbeddings",
|
||||||
|
"DeepInfraEmbeddings",
|
||||||
|
"DeterministicFakeEmbedding",
|
||||||
|
"EdenAiEmbeddings",
|
||||||
|
"ElasticsearchEmbeddings",
|
||||||
|
"EmbaasEmbeddings",
|
||||||
|
"ErnieEmbeddings",
|
||||||
|
"FakeEmbeddings",
|
||||||
|
"FastEmbedEmbeddings",
|
||||||
|
"GooglePalmEmbeddings",
|
||||||
|
"GPT4AllEmbeddings",
|
||||||
|
"GradientEmbeddings",
|
||||||
|
"HuggingFaceBgeEmbeddings",
|
||||||
|
"HuggingFaceEmbeddings",
|
||||||
|
"HuggingFaceHubEmbeddings",
|
||||||
|
"HuggingFaceInferenceAPIEmbeddings",
|
||||||
|
"HuggingFaceInstructEmbeddings",
|
||||||
|
"InfinityEmbeddings",
|
||||||
|
"JavelinAIGatewayEmbeddings",
|
||||||
|
"JinaEmbeddings",
|
||||||
|
"JohnSnowLabsEmbeddings",
|
||||||
|
"LlamaCppEmbeddings",
|
||||||
|
"LocalAIEmbeddings",
|
||||||
|
"MiniMaxEmbeddings",
|
||||||
|
"MlflowAIGatewayEmbeddings",
|
||||||
|
"MlflowEmbeddings",
|
||||||
|
"ModelScopeEmbeddings",
|
||||||
|
"MosaicMLInstructorEmbeddings",
|
||||||
|
"NLPCloudEmbeddings",
|
||||||
|
"OctoAIEmbeddings",
|
||||||
|
"OllamaEmbeddings",
|
||||||
|
"OpenAIEmbeddings",
|
||||||
|
"OpenVINOEmbeddings",
|
||||||
|
"QianfanEmbeddingsEndpoint",
|
||||||
|
"SagemakerEndpointEmbeddings",
|
||||||
|
"SelfHostedEmbeddings",
|
||||||
|
"SelfHostedHuggingFaceEmbeddings",
|
||||||
|
"SelfHostedHuggingFaceInstructEmbeddings",
|
||||||
|
"SentenceTransformerEmbeddings",
|
||||||
|
"SpacyEmbeddings",
|
||||||
|
"TensorflowHubEmbeddings",
|
||||||
|
"VertexAIEmbeddings",
|
||||||
|
"VoyageEmbeddings",
|
||||||
|
"XinferenceEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,7 +1,28 @@
|
|||||||
from langchain_community.embeddings.aleph_alpha import (
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import (
|
||||||
AlephAlphaAsymmetricSemanticEmbedding,
|
AlephAlphaAsymmetricSemanticEmbedding,
|
||||||
AlephAlphaSymmetricSemanticEmbedding,
|
AlephAlphaSymmetricSemanticEmbedding,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {
|
||||||
|
"AlephAlphaAsymmetricSemanticEmbedding": "langchain_community.embeddings",
|
||||||
|
"AlephAlphaSymmetricSemanticEmbedding": "langchain_community.embeddings",
|
||||||
|
}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"AlephAlphaAsymmetricSemanticEmbedding",
|
"AlephAlphaAsymmetricSemanticEmbedding",
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.awa import AwaEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["AwaEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import AwaEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"AwaEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"AwaEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.azure_openai import AzureOpenAIEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["AzureOpenAIEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import AzureOpenAIEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"AzureOpenAIEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"AzureOpenAIEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.baidu_qianfan_endpoint import (
|
from typing import TYPE_CHECKING, Any
|
||||||
QianfanEmbeddingsEndpoint,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["QianfanEmbeddingsEndpoint"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import QianfanEmbeddingsEndpoint
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"QianfanEmbeddingsEndpoint": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"QianfanEmbeddingsEndpoint",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.bedrock import BedrockEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["BedrockEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import BedrockEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"BedrockEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"BedrockEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.bookend import (
|
from typing import TYPE_CHECKING, Any
|
||||||
BookendEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["BookendEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import BookendEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"BookendEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"BookendEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.clarifai import ClarifaiEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["ClarifaiEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import ClarifaiEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"ClarifaiEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"ClarifaiEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,29 @@
|
|||||||
from langchain_community.embeddings.cloudflare_workersai import (
|
from typing import TYPE_CHECKING, Any
|
||||||
CloudflareWorkersAIEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["CloudflareWorkersAIEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings.cloudflare_workersai import (
|
||||||
|
CloudflareWorkersAIEmbeddings,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {
|
||||||
|
"CloudflareWorkersAIEmbeddings": (
|
||||||
|
"langchain_community.embeddings.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__ = [
|
||||||
|
"CloudflareWorkersAIEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.cohere import CohereEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["CohereEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import CohereEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"CohereEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"CohereEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.dashscope import (
|
from typing import TYPE_CHECKING, Any
|
||||||
DashScopeEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["DashScopeEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import DashScopeEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"DashScopeEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"DashScopeEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.databricks import DatabricksEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["DatabricksEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import DatabricksEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"DatabricksEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"DatabricksEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.deepinfra import (
|
from typing import TYPE_CHECKING, Any
|
||||||
DeepInfraEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["DeepInfraEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import DeepInfraEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"DeepInfraEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"DeepInfraEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.edenai import EdenAiEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["EdenAiEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import EdenAiEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"EdenAiEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"EdenAiEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.elasticsearch import ElasticsearchEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["ElasticsearchEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import ElasticsearchEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"ElasticsearchEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"ElasticsearchEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,6 +1,22 @@
|
|||||||
from langchain_community.embeddings.embaas import (
|
from typing import TYPE_CHECKING, Any
|
||||||
EmbaasEmbeddings,
|
|
||||||
)
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import EmbaasEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"EmbaasEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"EmbaasEmbeddings",
|
"EmbaasEmbeddings",
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.ernie import ErnieEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["ErnieEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import ErnieEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"ErnieEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"ErnieEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,6 +1,30 @@
|
|||||||
from langchain_community.embeddings.fake import (
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import (
|
||||||
DeterministicFakeEmbedding,
|
DeterministicFakeEmbedding,
|
||||||
FakeEmbeddings,
|
FakeEmbeddings,
|
||||||
)
|
)
|
||||||
|
|
||||||
__all__ = ["FakeEmbeddings", "DeterministicFakeEmbedding"]
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {
|
||||||
|
"FakeEmbeddings": "langchain_community.embeddings",
|
||||||
|
"DeterministicFakeEmbedding": "langchain_community.embeddings",
|
||||||
|
}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"FakeEmbeddings",
|
||||||
|
"DeterministicFakeEmbedding",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.fastembed import FastEmbedEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["FastEmbedEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import FastEmbedEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"FastEmbedEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"FastEmbedEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.google_palm import (
|
from typing import TYPE_CHECKING, Any
|
||||||
GooglePalmEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["GooglePalmEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import GooglePalmEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"GooglePalmEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"GooglePalmEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.gpt4all import GPT4AllEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["GPT4AllEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import GPT4AllEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"GPT4AllEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"GPT4AllEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.gradient_ai import GradientEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["GradientEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import GradientEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"GradientEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"GradientEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,9 +1,32 @@
|
|||||||
from langchain_community.embeddings.huggingface import (
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import (
|
||||||
HuggingFaceBgeEmbeddings,
|
HuggingFaceBgeEmbeddings,
|
||||||
HuggingFaceEmbeddings,
|
HuggingFaceEmbeddings,
|
||||||
HuggingFaceInferenceAPIEmbeddings,
|
HuggingFaceInferenceAPIEmbeddings,
|
||||||
HuggingFaceInstructEmbeddings,
|
HuggingFaceInstructEmbeddings,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {
|
||||||
|
"HuggingFaceEmbeddings": "langchain_community.embeddings",
|
||||||
|
"HuggingFaceInstructEmbeddings": "langchain_community.embeddings",
|
||||||
|
"HuggingFaceBgeEmbeddings": "langchain_community.embeddings",
|
||||||
|
"HuggingFaceInferenceAPIEmbeddings": "langchain_community.embeddings",
|
||||||
|
}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"HuggingFaceEmbeddings",
|
"HuggingFaceEmbeddings",
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.huggingface_hub import (
|
from typing import TYPE_CHECKING, Any
|
||||||
HuggingFaceHubEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["HuggingFaceHubEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import HuggingFaceHubEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"HuggingFaceHubEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"HuggingFaceHubEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,6 +1,30 @@
|
|||||||
from langchain_community.embeddings.infinity import (
|
from typing import TYPE_CHECKING, Any
|
||||||
InfinityEmbeddings,
|
|
||||||
TinyAsyncOpenAIInfinityEmbeddingClient,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["InfinityEmbeddings", "TinyAsyncOpenAIInfinityEmbeddingClient"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import InfinityEmbeddings
|
||||||
|
from langchain_community.embeddings.infinity import (
|
||||||
|
TinyAsyncOpenAIInfinityEmbeddingClient,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {
|
||||||
|
"InfinityEmbeddings": "langchain_community.embeddings",
|
||||||
|
"TinyAsyncOpenAIInfinityEmbeddingClient": "langchain_community.embeddings.infinity",
|
||||||
|
}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"InfinityEmbeddings",
|
||||||
|
"TinyAsyncOpenAIInfinityEmbeddingClient",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.javelin_ai_gateway import (
|
from typing import TYPE_CHECKING, Any
|
||||||
JavelinAIGatewayEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["JavelinAIGatewayEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import JavelinAIGatewayEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"JavelinAIGatewayEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"JavelinAIGatewayEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.jina import JinaEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["JinaEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import JinaEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"JinaEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"JinaEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.johnsnowlabs import JohnSnowLabsEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["JohnSnowLabsEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import JohnSnowLabsEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"JohnSnowLabsEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"JohnSnowLabsEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.llamacpp import LlamaCppEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["LlamaCppEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import LlamaCppEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"LlamaCppEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"LlamaCppEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.llm_rails import LLMRailsEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["LLMRailsEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import LLMRailsEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"LLMRailsEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"LLMRailsEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,6 +1,22 @@
|
|||||||
from langchain_community.embeddings.localai import (
|
from typing import TYPE_CHECKING, Any
|
||||||
LocalAIEmbeddings,
|
|
||||||
)
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import LocalAIEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"LocalAIEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"LocalAIEmbeddings",
|
"LocalAIEmbeddings",
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.minimax import (
|
from typing import TYPE_CHECKING, Any
|
||||||
MiniMaxEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["MiniMaxEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import MiniMaxEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"MiniMaxEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"MiniMaxEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.mlflow import MlflowEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["MlflowEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import MlflowEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"MlflowEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"MlflowEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.mlflow_gateway import (
|
from typing import TYPE_CHECKING, Any
|
||||||
MlflowAIGatewayEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["MlflowAIGatewayEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import MlflowAIGatewayEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"MlflowAIGatewayEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"MlflowAIGatewayEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.modelscope_hub import ModelScopeEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["ModelScopeEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import ModelScopeEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"ModelScopeEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"ModelScopeEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.mosaicml import MosaicMLInstructorEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["MosaicMLInstructorEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import MosaicMLInstructorEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"MosaicMLInstructorEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"MosaicMLInstructorEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.nlpcloud import NLPCloudEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["NLPCloudEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import NLPCloudEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"NLPCloudEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"NLPCloudEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.octoai_embeddings import (
|
from typing import TYPE_CHECKING, Any
|
||||||
OctoAIEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["OctoAIEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import OctoAIEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"OctoAIEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"OctoAIEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.ollama import OllamaEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["OllamaEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import OllamaEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"OllamaEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"OllamaEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,6 +1,22 @@
|
|||||||
from langchain_community.embeddings.openai import (
|
from typing import TYPE_CHECKING, Any
|
||||||
OpenAIEmbeddings,
|
|
||||||
)
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import OpenAIEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"OpenAIEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"OpenAIEmbeddings",
|
"OpenAIEmbeddings",
|
||||||
|
@ -1,6 +1,30 @@
|
|||||||
from langchain_community.embeddings.sagemaker_endpoint import (
|
from typing import TYPE_CHECKING, Any
|
||||||
EmbeddingsContentHandler,
|
|
||||||
SagemakerEndpointEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["EmbeddingsContentHandler", "SagemakerEndpointEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import SagemakerEndpointEmbeddings
|
||||||
|
from langchain_community.embeddings.sagemaker_endpoint import (
|
||||||
|
EmbeddingsContentHandler,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {
|
||||||
|
"EmbeddingsContentHandler": "langchain_community.embeddings.sagemaker_endpoint",
|
||||||
|
"SagemakerEndpointEmbeddings": "langchain_community.embeddings",
|
||||||
|
}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"EmbeddingsContentHandler",
|
||||||
|
"SagemakerEndpointEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.self_hosted import (
|
from typing import TYPE_CHECKING, Any
|
||||||
SelfHostedEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["SelfHostedEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import SelfHostedEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"SelfHostedEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"SelfHostedEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,7 +1,28 @@
|
|||||||
from langchain_community.embeddings.self_hosted_hugging_face import (
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import (
|
||||||
SelfHostedHuggingFaceEmbeddings,
|
SelfHostedHuggingFaceEmbeddings,
|
||||||
SelfHostedHuggingFaceInstructEmbeddings,
|
SelfHostedHuggingFaceInstructEmbeddings,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {
|
||||||
|
"SelfHostedHuggingFaceEmbeddings": "langchain_community.embeddings",
|
||||||
|
"SelfHostedHuggingFaceInstructEmbeddings": "langchain_community.embeddings",
|
||||||
|
}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"SelfHostedHuggingFaceEmbeddings",
|
"SelfHostedHuggingFaceEmbeddings",
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.spacy_embeddings import SpacyEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["SpacyEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import SpacyEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"SpacyEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"SpacyEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,5 +1,23 @@
|
|||||||
from langchain_community.embeddings.tensorflow_hub import (
|
from typing import TYPE_CHECKING, Any
|
||||||
TensorflowHubEmbeddings,
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = ["TensorflowHubEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import TensorflowHubEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"TensorflowHubEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"TensorflowHubEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.vertexai import VertexAIEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["VertexAIEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import VertexAIEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"VertexAIEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"VertexAIEmbeddings",
|
||||||
|
]
|
||||||
|
@ -1,6 +1,22 @@
|
|||||||
from langchain_community.embeddings.voyageai import (
|
from typing import TYPE_CHECKING, Any
|
||||||
VoyageEmbeddings,
|
|
||||||
)
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import VoyageEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"VoyageEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"VoyageEmbeddings",
|
"VoyageEmbeddings",
|
||||||
|
@ -1,3 +1,23 @@
|
|||||||
from langchain_community.embeddings.xinference import XinferenceEmbeddings
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
__all__ = ["XinferenceEmbeddings"]
|
from langchain._api import create_importer
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from langchain_community.embeddings import XinferenceEmbeddings
|
||||||
|
|
||||||
|
# Create a way to dynamically look up deprecated imports.
|
||||||
|
# Used to consolidate logic for raising deprecation warnings and
|
||||||
|
# handling optional imports.
|
||||||
|
DEPRECATED_LOOKUP = {"XinferenceEmbeddings": "langchain_community.embeddings"}
|
||||||
|
|
||||||
|
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||||
|
|
||||||
|
|
||||||
|
def __getattr__(name: str) -> Any:
|
||||||
|
"""Look up attributes dynamically."""
|
||||||
|
return _import_attribute(name)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"XinferenceEmbeddings",
|
||||||
|
]
|
||||||
|
@ -44,6 +44,7 @@ EXPECTED_ALL = [
|
|||||||
"SpacyEmbeddings",
|
"SpacyEmbeddings",
|
||||||
"NLPCloudEmbeddings",
|
"NLPCloudEmbeddings",
|
||||||
"GPT4AllEmbeddings",
|
"GPT4AllEmbeddings",
|
||||||
|
"OpenVINOEmbeddings",
|
||||||
"XinferenceEmbeddings",
|
"XinferenceEmbeddings",
|
||||||
"LocalAIEmbeddings",
|
"LocalAIEmbeddings",
|
||||||
"AwaEmbeddings",
|
"AwaEmbeddings",
|
||||||
|
Loading…
Reference in New Issue
Block a user