From c8162fc43a748a97aab4647be2f5cdf50bc739ea Mon Sep 17 00:00:00 2001 From: Max Resnick Date: Tue, 28 Jan 2025 22:27:47 -0800 Subject: chore: rebase and fix up conflicts --- py/types.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 py/types.py (limited to 'py/types.py') diff --git a/py/types.py b/py/types.py new file mode 100644 index 0000000..819afe5 --- /dev/null +++ b/py/types.py @@ -0,0 +1,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 + -- cgit v1.2.3