initial commit

This commit is contained in:
2026-05-11 12:36:20 +05:30
commit 384cbe8019
15377 changed files with 2360544 additions and 0 deletions

View File

@@ -0,0 +1,168 @@
"""**Utilities** are the integrations with third-part systems and packages.
Other LangChain classes use **Utilities** to interact with third-part systems
and packages.
"""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import (
AlphaVantageAPIWrapper,
ApifyWrapper,
ArceeWrapper,
ArxivAPIWrapper,
BibtexparserWrapper,
BingSearchAPIWrapper,
BraveSearchWrapper,
DuckDuckGoSearchAPIWrapper,
GoldenQueryAPIWrapper,
GoogleFinanceAPIWrapper,
GoogleJobsAPIWrapper,
GoogleLensAPIWrapper,
GooglePlacesAPIWrapper,
GoogleScholarAPIWrapper,
GoogleSearchAPIWrapper,
GoogleSerperAPIWrapper,
GoogleTrendsAPIWrapper,
GraphQLAPIWrapper,
JiraAPIWrapper,
LambdaWrapper,
MaxComputeAPIWrapper,
MerriamWebsterAPIWrapper,
MetaphorSearchAPIWrapper,
NasaAPIWrapper,
OpenWeatherMapAPIWrapper,
OutlineAPIWrapper,
Portkey,
PowerBIDataset,
PubMedAPIWrapper,
Requests,
RequestsWrapper,
SceneXplainAPIWrapper,
SearchApiAPIWrapper,
SearxSearchWrapper,
SerpAPIWrapper,
SparkSQL,
SQLDatabase,
StackExchangeAPIWrapper,
SteamWebAPIWrapper,
TensorflowDatasets,
TextRequestsWrapper,
TwilioAPIWrapper,
WikipediaAPIWrapper,
WolframAlphaAPIWrapper,
ZapierNLAWrapper,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"AlphaVantageAPIWrapper": "langchain_community.utilities",
"ApifyWrapper": "langchain_community.utilities",
"ArceeWrapper": "langchain_community.utilities",
"ArxivAPIWrapper": "langchain_community.utilities",
"BibtexparserWrapper": "langchain_community.utilities",
"BingSearchAPIWrapper": "langchain_community.utilities",
"BraveSearchWrapper": "langchain_community.utilities",
"DuckDuckGoSearchAPIWrapper": "langchain_community.utilities",
"GoldenQueryAPIWrapper": "langchain_community.utilities",
"GoogleFinanceAPIWrapper": "langchain_community.utilities",
"GoogleLensAPIWrapper": "langchain_community.utilities",
"GoogleJobsAPIWrapper": "langchain_community.utilities",
"GooglePlacesAPIWrapper": "langchain_community.utilities",
"GoogleScholarAPIWrapper": "langchain_community.utilities",
"GoogleTrendsAPIWrapper": "langchain_community.utilities",
"GoogleSearchAPIWrapper": "langchain_community.utilities",
"GoogleSerperAPIWrapper": "langchain_community.utilities",
"GraphQLAPIWrapper": "langchain_community.utilities",
"JiraAPIWrapper": "langchain_community.utilities",
"LambdaWrapper": "langchain_community.utilities",
"MaxComputeAPIWrapper": "langchain_community.utilities",
"MerriamWebsterAPIWrapper": "langchain_community.utilities",
"MetaphorSearchAPIWrapper": "langchain_community.utilities",
"NasaAPIWrapper": "langchain_community.utilities",
"OpenWeatherMapAPIWrapper": "langchain_community.utilities",
"OutlineAPIWrapper": "langchain_community.utilities",
"Portkey": "langchain_community.utilities",
"PowerBIDataset": "langchain_community.utilities",
"PubMedAPIWrapper": "langchain_community.utilities",
# We will not list PythonREPL in __all__ since it has been removed from community
# it'll proxy to community package, which will raise an appropriate exception.
"PythonREPL": "langchain_community.utilities",
"Requests": "langchain_community.utilities",
"SteamWebAPIWrapper": "langchain_community.utilities",
"SQLDatabase": "langchain_community.utilities",
"SceneXplainAPIWrapper": "langchain_community.utilities",
"SearchApiAPIWrapper": "langchain_community.utilities",
"SearxSearchWrapper": "langchain_community.utilities",
"SerpAPIWrapper": "langchain_community.utilities",
"SparkSQL": "langchain_community.utilities",
"StackExchangeAPIWrapper": "langchain_community.utilities",
"TensorflowDatasets": "langchain_community.utilities",
"RequestsWrapper": "langchain_community.utilities",
"TextRequestsWrapper": "langchain_community.utilities",
"TwilioAPIWrapper": "langchain_community.utilities",
"WikipediaAPIWrapper": "langchain_community.utilities",
"WolframAlphaAPIWrapper": "langchain_community.utilities",
"ZapierNLAWrapper": "langchain_community.utilities",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"AlphaVantageAPIWrapper",
"ApifyWrapper",
"ArceeWrapper",
"ArxivAPIWrapper",
"BibtexparserWrapper",
"BingSearchAPIWrapper",
"BraveSearchWrapper",
"DuckDuckGoSearchAPIWrapper",
"GoldenQueryAPIWrapper",
"GoogleFinanceAPIWrapper",
"GoogleJobsAPIWrapper",
"GoogleLensAPIWrapper",
"GooglePlacesAPIWrapper",
"GoogleScholarAPIWrapper",
"GoogleSearchAPIWrapper",
"GoogleSerperAPIWrapper",
"GoogleTrendsAPIWrapper",
"GraphQLAPIWrapper",
"JiraAPIWrapper",
"LambdaWrapper",
"MaxComputeAPIWrapper",
"MerriamWebsterAPIWrapper",
"MetaphorSearchAPIWrapper",
"NasaAPIWrapper",
"OpenWeatherMapAPIWrapper",
"OutlineAPIWrapper",
"Portkey",
"PowerBIDataset",
"PubMedAPIWrapper",
"Requests",
"RequestsWrapper",
"SQLDatabase",
"SceneXplainAPIWrapper",
"SearchApiAPIWrapper",
"SearxSearchWrapper",
"SerpAPIWrapper",
"SparkSQL",
"StackExchangeAPIWrapper",
"SteamWebAPIWrapper",
"TensorflowDatasets",
"TextRequestsWrapper",
"TwilioAPIWrapper",
"WikipediaAPIWrapper",
"WolframAlphaAPIWrapper",
"ZapierNLAWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import AlphaVantageAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"AlphaVantageAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"AlphaVantageAPIWrapper",
]

View File

@@ -0,0 +1,30 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.anthropic import (
get_num_tokens_anthropic,
get_token_ids_anthropic,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"get_num_tokens_anthropic": "langchain_community.utilities.anthropic",
"get_token_ids_anthropic": "langchain_community.utilities.anthropic",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"get_num_tokens_anthropic",
"get_token_ids_anthropic",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import ApifyWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"ApifyWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"ApifyWrapper",
]

View File

@@ -0,0 +1,45 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import ArceeWrapper
from langchain_community.utilities.arcee import (
ArceeDocument,
ArceeDocumentAdapter,
ArceeDocumentSource,
ArceeRoute,
DALMFilter,
DALMFilterType,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"ArceeRoute": "langchain_community.utilities.arcee",
"DALMFilterType": "langchain_community.utilities.arcee",
"DALMFilter": "langchain_community.utilities.arcee",
"ArceeDocumentSource": "langchain_community.utilities.arcee",
"ArceeDocument": "langchain_community.utilities.arcee",
"ArceeDocumentAdapter": "langchain_community.utilities.arcee",
"ArceeWrapper": "langchain_community.utilities",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"ArceeDocument",
"ArceeDocumentAdapter",
"ArceeDocumentSource",
"ArceeRoute",
"ArceeWrapper",
"DALMFilter",
"DALMFilterType",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import ArxivAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"ArxivAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"ArxivAPIWrapper",
]

View File

@@ -0,0 +1,11 @@
"""Shims for asyncio features that may be missing from older python versions."""
import sys
if sys.version_info[:2] < (3, 11):
from async_timeout import timeout as asyncio_timeout
else:
from asyncio import timeout as asyncio_timeout
__all__ = ["asyncio_timeout"]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import LambdaWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"LambdaWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"LambdaWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import BibtexparserWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"BibtexparserWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"BibtexparserWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import BingSearchAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"BingSearchAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"BingSearchAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import BraveSearchWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"BraveSearchWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"BraveSearchWrapper",
]

View File

@@ -0,0 +1,45 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.clickup import (
ClickupAPIWrapper,
Component,
CUList,
Member,
Space,
Task,
Team,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"Component": "langchain_community.utilities.clickup",
"Task": "langchain_community.utilities.clickup",
"CUList": "langchain_community.utilities.clickup",
"Member": "langchain_community.utilities.clickup",
"Team": "langchain_community.utilities.clickup",
"Space": "langchain_community.utilities.clickup",
"ClickupAPIWrapper": "langchain_community.utilities.clickup",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"CUList",
"ClickupAPIWrapper",
"Component",
"Member",
"Space",
"Task",
"Team",
]

View File

@@ -0,0 +1,25 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.dalle_image_generator import DallEAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"DallEAPIWrapper": "langchain_community.utilities.dalle_image_generator",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"DallEAPIWrapper",
]

View File

@@ -0,0 +1,25 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.dataforseo_api_search import DataForSeoAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"DataForSeoAPIWrapper": "langchain_community.utilities.dataforseo_api_search",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"DataForSeoAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import DuckDuckGoSearchAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"DuckDuckGoSearchAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"DuckDuckGoSearchAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.github import GitHubAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GitHubAPIWrapper": "langchain_community.utilities.github"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GitHubAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.gitlab import GitLabAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GitLabAPIWrapper": "langchain_community.utilities.gitlab"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GitLabAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import GoldenQueryAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GoldenQueryAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GoldenQueryAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import GoogleFinanceAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GoogleFinanceAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GoogleFinanceAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import GoogleJobsAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GoogleJobsAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GoogleJobsAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import GoogleLensAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GoogleLensAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GoogleLensAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import GooglePlacesAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GooglePlacesAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GooglePlacesAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import GoogleScholarAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GoogleScholarAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GoogleScholarAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import GoogleSearchAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GoogleSearchAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GoogleSearchAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import GoogleSerperAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GoogleSerperAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GoogleSerperAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import GoogleTrendsAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GoogleTrendsAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GoogleTrendsAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import GraphQLAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"GraphQLAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"GraphQLAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import JiraAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"JiraAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"JiraAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import MaxComputeAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"MaxComputeAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"MaxComputeAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import MerriamWebsterAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"MerriamWebsterAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"MerriamWebsterAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import MetaphorSearchAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"MetaphorSearchAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"MetaphorSearchAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import NasaAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"NasaAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"NasaAPIWrapper",
]

View File

@@ -0,0 +1,27 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.opaqueprompts import desanitize, sanitize
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"sanitize": "langchain_community.utilities.opaqueprompts",
"desanitize": "langchain_community.utilities.opaqueprompts",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"desanitize",
"sanitize",
]

View File

@@ -0,0 +1,28 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.tools import OpenAPISpec
from langchain_community.utilities.openapi import HTTPVerb
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"HTTPVerb": "langchain_community.utilities.openapi",
"OpenAPISpec": "langchain_community.tools",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"HTTPVerb",
"OpenAPISpec",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import OpenWeatherMapAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"OpenWeatherMapAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"OpenWeatherMapAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import OutlineAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"OutlineAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"OutlineAPIWrapper",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import Portkey
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"Portkey": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"Portkey",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import PowerBIDataset
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"PowerBIDataset": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"PowerBIDataset",
]

View File

@@ -0,0 +1,23 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities import PubMedAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"PubMedAPIWrapper": "langchain_community.utilities"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"PubMedAPIWrapper",
]

View File

@@ -0,0 +1,19 @@
"""For backwards compatibility."""
from typing import Any
from langchain_classic._api import create_importer
# Code has been removed from the community package as well.
# We'll proxy to community package, which will raise an appropriate exception,
# but we'll not include this in __all__, so it won't be listed as importable.
_importer = create_importer(
__package__,
deprecated_lookups={"PythonREPL": "langchain_community.utilities.python"},
)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _importer(name)

View File

@@ -0,0 +1,25 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.reddit_search import RedditSearchAPIWrapper
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"RedditSearchAPIWrapper": "langchain_community.utilities.reddit_search",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"RedditSearchAPIWrapper",
]

View File

@@ -0,0 +1,33 @@
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.utilities.redis import (
TokenEscaper,
check_redis_module_exist,
get_client,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {
"TokenEscaper": "langchain_community.utilities.redis",
"check_redis_module_exist": "langchain_community.utilities.redis",
"get_client": "langchain_community.utilities.redis",
}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = [
"TokenEscaper",
"check_redis_module_exist",
"get_client",
]

Some files were not shown because too many files have changed in this diff Show More