INNER CODE UNIT · Python

_get_provider_class

concierge-hq/concierge · __init__.py:47

def _get_provider_class(provider_type: ProviderType):
    """Lazy load provider to avoid importing optional dependencies."""
    if provider_type == ProviderType.SEARCH:
        try:
            from concierge.backends.search_backend import SearchBackend
        except ImportError as e:
            raise ImportError(
                "ProviderType.SEARCH requires the 'all' extras "
                "(sentence-transformers, numpy). Install with: "
                "pip install 'concierge-sdk[all]'"
            ) from e

        return SearchBackend
    if provider_type == ProviderType.PLAN:
        return PlanBackend
    if provider_type == ProviderType.CODE:
        return CodeBackend
    return VanillaBackend

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…