2 parents 0d1f76a + 81efcff commit b0731f4Copy full SHA for b0731f4
1 file changed
python/insight/app/api/log_analysis/utils/utils.py
@@ -62,6 +62,13 @@ def delete_chat_session(self, path: SessionIdPath):
62
else:
63
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Session Not Found")
64
65
+ def delete_all_chat_sessions(self):
66
+ sessions = self.repo.delete_all_sessions()
67
+ if sessions:
68
+ return [self.map_session_to_res(session) for session in sessions]
69
+ else:
70
+ raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="No Sessions Found")
71
+
72
async def get_chat_session_history(self, path: SessionIdPath):
73
session_id = path.sessionId
74
session_info = self.repo.get_session_by_id(session_id)
0 commit comments