from abc import ABC, abstractmethod
from typing import List, Dict


class BaseProvider(ABC):
    """
    Base class for all LLM providers.
    Any new provider just needs to implement `complete()`.
    """

    def __init__(self, api_key: str, model: str):
        self.api_key = api_key
        self.model = model

    @abstractmethod
    def complete(self, messages: List[Dict], system_prompt: str = "") -> str:
        """
        Send messages to the LLM and return the response text.
        messages: [{"role": "user"/"assistant", "content": "..."}]
        """
        pass
