diff options
| author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-04-13 02:26:01 +0200 |
|---|---|---|
| committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-04-13 02:26:01 +0200 |
| commit | 72d1caf92115d90ae789de1cffed29406f2a0a39 (patch) | |
| tree | ca4f3b755dccdd94894f18e7ce599cfd7eb28e58 /rag/generator/abstract.py | |
| parent | 36722903391ec42d5458112bc0549eb843548d90 (diff) | |
Wip chat ui
Diffstat (limited to 'rag/generator/abstract.py')
| -rw-r--r-- | rag/generator/abstract.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rag/generator/abstract.py b/rag/generator/abstract.py index 1beacfb..71edfc4 100644 --- a/rag/generator/abstract.py +++ b/rag/generator/abstract.py @@ -1,5 +1,5 @@ from abc import abstractmethod -from typing import Any, Generator +from typing import Any, Dict, Generator, List from .prompt import Prompt @@ -16,3 +16,9 @@ class AbstractGenerator(type): @abstractmethod def generate(self, prompt: Prompt) -> Generator[Any, Any, Any]: pass + + @abstractmethod + def chat( + self, prompt: Prompt, messages: List[Dict[str, str]] + ) -> Generator[Any, Any, Any]: + pass |