Files
kandrusyak_bot/assistant_bot/ai.py
kandrusyak 6667e0d253 init
2026-07-25 15:07:53 +03:00

25 lines
485 B
Python

from typing import Protocol
class AIClientError(RuntimeError):
"""Raised when the configured AI provider cannot complete a request."""
class AIClient(Protocol):
provider: str
display_name: str
async def list_models(self) -> list[str]:
...
def normalize_model(self, model: str) -> str:
...
async def chat(
self,
model: str,
messages: list[dict[str, str]],
json_mode: bool = False,
) -> str:
...