codekingpro/portable-devtools
114k
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 