summaryrefslogtreecommitdiff
path: root/rag/generator/abstract.py
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-13 02:26:01 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-04-13 02:26:01 +0200
commit72d1caf92115d90ae789de1cffed29406f2a0a39 (patch)
treeca4f3b755dccdd94894f18e7ce599cfd7eb28e58 /rag/generator/abstract.py
parent36722903391ec42d5458112bc0549eb843548d90 (diff)
Wip chat ui
Diffstat (limited to 'rag/generator/abstract.py')
-rw-r--r--rag/generator/abstract.py8
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