Files
voice-to-notes/python/voice_to_notes/providers/base.py
T

27 lines
645 B
Python
Raw Normal View History

"""Abstract base class for AI providers."""
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import Any
class AIProvider(ABC):
"""Base interface for all AI providers."""
@abstractmethod
def chat(self, messages: list[dict[str, str]], **kwargs: Any) -> str:
"""Send a chat completion request and return the full response text."""
...
@abstractmethod
def is_available(self) -> bool:
"""Check if this provider is configured and available."""
...
@property
@abstractmethod
def name(self) -> str:
"""Provider display name."""
...