VPM100 commited on
Commit
0889bcb
·
verified ·
1 Parent(s): 167aca8

Upload shared/base_assistant.py

Browse files
Files changed (1) hide show
  1. shared/base_assistant.py +13 -0
shared/base_assistant.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from abc import ABC, abstractmethod
2
+ from typing import List, Tuple
3
+
4
+
5
+ class BaseAssistant(ABC):
6
+ """Abstract base for both OSS and frontier assistants."""
7
+
8
+ @abstractmethod
9
+ def chat(self, message: str, history: List[Tuple[str, str]]) -> str:
10
+ """Return assistant reply given a user message and Gradio-format history."""
11
+
12
+ def reset(self) -> None:
13
+ """Override to clear any session state beyond history."""