Files
saksham 1a4c80958f 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).
2026-08-05 10:48:20 -04:00

27 lines
763 B
Python

"""Search provider interface. Answers "where should we look?" - discovery
only, never a replacement for the LLM or for a SourceCollector. Every
company-discovery query (official website, aliases, competitors, HQ) goes
through this Protocol, never a specific vendor SDK - swapping
`SEARCH_PROVIDER` changes which class `get_search_provider()` returns and
nothing else has to change. See app/services/discovery_service.py for the
only caller.
"""
from __future__ import annotations
from typing import Protocol
from pydantic import BaseModel
class SearchResult(BaseModel):
title: str
url: str
snippet: str
class SearchProvider(Protocol):
provider_name: str
async def search(self, query: str, *, count: int = 5) -> list[SearchResult]: ...