Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
azure_cosmos_db.py29 linesDownload Raw Back to vectorstores
1from typing import TYPE_CHECKING, Any2 3from langchain_classic._api import create_importer4 5if TYPE_CHECKING:6    from langchain_community.vectorstores import AzureCosmosDBVectorSearch7    from langchain_community.vectorstores.azure_cosmos_db import CosmosDBSimilarityType8 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    "CosmosDBSimilarityType": "langchain_community.vectorstores.azure_cosmos_db",14    "AzureCosmosDBVectorSearch": "langchain_community.vectorstores",15}16 17_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)18 19 20def __getattr__(name: str) -> Any:21    """Look up attributes dynamically."""22    return _import_attribute(name)23 24 25__all__ = [26    "AzureCosmosDBVectorSearch",27    "CosmosDBSimilarityType",28]29 
codekingpro/portable-devtools · Team Ai