codekingpro/portable-devtools
114k
1from typing import TYPE_CHECKING, Any2 3from langchain_classic._api import create_importer4 5if TYPE_CHECKING:6 from langchain_community.vectorstores import MyScale, MyScaleSettings7 from langchain_community.vectorstores.myscale import MyScaleWithoutJSON8 9# Create a way to dynamically look up deprecated imports.10# Used to consolidate logic for raising deprecation warnings and11# handling optional imports.12DEPRECATED_LOOKUP = {13 "MyScaleSettings": "langchain_community.vectorstores",14 "MyScale": "langchain_community.vectorstores",15 "MyScaleWithoutJSON": "langchain_community.vectorstores.myscale",16}17 18_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)19 20 21def __getattr__(name: str) -> Any:22 """Look up attributes dynamically."""23 return _import_attribute(name)24 25 26__all__ = [27 "MyScale",28 "MyScaleSettings",29 "MyScaleWithoutJSON",30]31 