MCPcopy Create free account
hub / github.com/HKUDS/Paper2Slides / cancel_session

Function cancel_session

api/server.py:132–142  ·  view source on GitHub ↗

Cancel a running session

(session_id: str)

Source from the content-addressed store, hash-verified

130
131@app.post("/api/cancel/{session_id}")
132async def cancel_session(session_id: str):
133 """Cancel a running session"""
134 try:
135 cancelled = await session_manager.cancel_session(session_id)
136 if cancelled:
137 return {"message": f"Session {session_id[:8]} cancellation requested", "cancelled": True}
138 else:
139 return {"message": f"Session {session_id[:8]} is not running", "cancelled": False}
140 except Exception as e:
141 logger.error(f"Error cancelling session {session_id}: {e}")
142 raise HTTPException(status_code=500, detail=str(e))
143
144
145@app.post("/api/chat", response_model=ChatResponse)

Callers

nothing calls this directly

Calls 1

cancel_sessionMethod · 0.80

Tested by

no test coverage detected