feat : stop button integration

This commit is contained in:
martin legrand
2025-05-20 16:47:35 +02:00
parent 102dc60efb
commit e3d01083d9
12 changed files with 122 additions and 22 deletions
+6
View File
@@ -128,6 +128,12 @@ async def is_active():
logger.info("Is active endpoint called")
return {"is_active": interaction.is_active}
@api.get("/stop")
async def stop():
logger.info("Stop endpoint called")
interaction.current_agent.request_stop()
return JSONResponse(status_code=200, content={"status": "stopped"})
@api.get("/latest_answer")
async def get_latest_answer():
global query_resp_history