blob: 819afe53f54e027f9ed10038971523f32af81915 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
from collections.abc import Sequence, Mapping
from typing import TypedDict, Protocol
class AIProvider(Protocol):
def __init__(self, config: Mapping[str, str]) -> None:
pass
def request(self, messages: Sequence[Message]) -> Generator[str]:
pass
class Message(TypedDict):
role: str
content: str
type: str
|