Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
requests.py36 linesDownload Raw Back to langchain_classic
1"""DEPRECATED: Kept for backwards compatibility."""2 3from typing import TYPE_CHECKING, Any4 5from langchain_classic._api import create_importer6 7if TYPE_CHECKING:8    from langchain_community.utilities import (9        Requests,10        RequestsWrapper,11        TextRequestsWrapper,12    )13 14# Create a way to dynamically look up deprecated imports.15# Used to consolidate logic for raising deprecation warnings and16# handling optional imports.17DEPRECATED_LOOKUP = {18    "Requests": "langchain_community.utilities",19    "RequestsWrapper": "langchain_community.utilities",20    "TextRequestsWrapper": "langchain_community.utilities",21}22 23_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)24 25 26def __getattr__(name: str) -> Any:27    """Look up attributes dynamically."""28    return _import_attribute(name)29 30 31__all__ = [32    "Requests",33    "RequestsWrapper",34    "TextRequestsWrapper",35]36 
codekingpro/portable-devtools · Team Ai