Initial commit: CI Agent competitive-intelligence monitoring app
FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring, source collection, LLM-based change analysis, enrichment, and account security (Turnstile, escalating lockout, email verification).
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"""Resolves `SEARCH_PROVIDER` to a concrete provider instance. Never
|
||||
imported directly by discovery_service - always go through
|
||||
`get_search_provider()` so swapping providers stays a one-line config
|
||||
change."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from app.core.config import Settings, get_settings
|
||||
from app.search.base import SearchProvider
|
||||
from app.search.mock import MockSearchProvider
|
||||
|
||||
|
||||
def get_search_provider(settings: Settings | None = None) -> SearchProvider:
|
||||
settings = settings or get_settings()
|
||||
|
||||
if settings.search_provider == "brave":
|
||||
from app.search.brave import BraveSearchProvider
|
||||
|
||||
return BraveSearchProvider(settings)
|
||||
|
||||
return MockSearchProvider()
|
||||
Reference in New Issue
Block a user