File size: 342 Bytes
6364e69 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Any, Dict
class LLMBase(ABC):
"""Abstract interface for pluggable LLM backends."""
name: str = "base"
@abstractmethod
def generate(self, prompt: str, context: Dict[str, Any] | None = None) -> str:
raise NotImplementedError
|