Spaces:
Sleeping
Sleeping
Update app/models/assistant.py
Browse files- app/models/assistant.py +17 -0
app/models/assistant.py
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class Assistant:
|
| 2 |
+
|
| 3 |
+
def __init__(self):
|
| 4 |
+
self.ready = True
|
| 5 |
+
|
| 6 |
+
def answer(self, message: str):
|
| 7 |
+
|
| 8 |
+
response = f"Echo: {message}"
|
| 9 |
+
|
| 10 |
+
sources = []
|
| 11 |
+
|
| 12 |
+
contexts = []
|
| 13 |
+
|
| 14 |
+
return response, sources, contexts
|
| 15 |
+
|
| 16 |
+
def cleanup(self):
|
| 17 |
+
self.ready = False
|