diff options
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 |