Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
tool.py28 linesDownload Raw Back to google_serper
1from typing import TYPE_CHECKING, Any2 3from langchain_classic._api import create_importer4 5if TYPE_CHECKING:6    from langchain_community.tools import GoogleSerperResults, GoogleSerperRun7 8# Create a way to dynamically look up deprecated imports.9# Used to consolidate logic for raising deprecation warnings and10# handling optional imports.11DEPRECATED_LOOKUP = {12    "GoogleSerperRun": "langchain_community.tools",13    "GoogleSerperResults": "langchain_community.tools",14}15 16_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)17 18 19def __getattr__(name: str) -> Any:20    """Look up attributes dynamically."""21    return _import_attribute(name)22 23 24__all__ = [25    "GoogleSerperResults",26    "GoogleSerperRun",27]28 
codekingpro/portable-devtools · Team Ai