protocol.py
1 from __future__ import annotations
2
3 from typing import Protocol
4
5
6 class LLM(Protocol):
7 """Protocol for LLM chat/generation backends."""
8 def generate(self, prompt: str) -> str:
9 """Generate a response from a plain prompt string."""
10 ...