Spaces:
Sleeping
Sleeping
Create session.py
Browse files- session.py +6 -0
session.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from agents import SQLiteSession
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
def get_session(thread_id: str):
|
| 5 |
+
db_path = os.path.join(os.path.dirname(__file__), "/tmp/conversations.db")
|
| 6 |
+
return SQLiteSession(thread_id, db_path)
|