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,26 @@
|
||||
"""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]: ...
|
||||
Reference in New Issue
Block a user