summaryrefslogtreecommitdiff
path: root/py/types.py
diff options
context:
space:
mode:
authorMax Resnick <max@ofmax.li>2025-01-28 22:27:47 -0800
committerMax Resnick <max@ofmax.li>2025-01-31 22:45:23 -0800
commitc8162fc43a748a97aab4647be2f5cdf50bc739ea (patch)
tree0099688a7a09af76a2ae978790c5e013b59bcb9c /py/types.py
parent380d5cdd9538c2522dfc8d03a8a261760bb0439a (diff)
downloadvim-ai-c8162fc43a748a97aab4647be2f5cdf50bc739ea.tar.gz
chore: rebase and fix up conflicts
Diffstat (limited to 'py/types.py')
-rw-r--r--py/types.py17
1 files changed, 17 insertions, 0 deletions
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
+