from abc import ABC, abstractmethod
from dataclasses import dataclass, field


@dataclass
class ClassificationResult:
    topics: list[str] = field(default_factory=list)
    suggested_new_topics: list[str] = field(default_factory=list)
    reasoning: str = ""


class AIProvider(ABC):
    @abstractmethod
    async def classify(
        self,
        document_text: str,
        existing_topics: list[str],
        system_prompt: str,
    ) -> ClassificationResult:
        ...

    @abstractmethod
    async def suggest_topics(
        self,
        document_text: str,
        system_prompt: str,
    ) -> list[str]:
        ...

    @abstractmethod
    async def health_check(self) -> bool:
        ...
