diff options
| author | Max Resnick <max@ofmax.li> | 2025-01-28 22:27:47 -0800 |
|---|---|---|
| committer | Max Resnick <max@ofmax.li> | 2025-01-31 22:45:23 -0800 |
| commit | c8162fc43a748a97aab4647be2f5cdf50bc739ea (patch) | |
| tree | 0099688a7a09af76a2ae978790c5e013b59bcb9c /py/types.py | |
| parent | 380d5cdd9538c2522dfc8d03a8a261760bb0439a (diff) | |
| download | vim-ai-c8162fc43a748a97aab4647be2f5cdf50bc739ea.tar.gz | |
chore: rebase and fix up conflicts
Diffstat (limited to 'py/types.py')
| -rw-r--r-- | py/types.py | 17 |
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 + |