feat: 删除聊天记录接口

This commit is contained in:
martsforever
2025-09-04 16:25:08 +08:00
parent 4a307c4551
commit 3c67e1f220
+1 -1
View File
@@ -243,7 +243,7 @@ def add_langgraph_chat_route(app: FastAPI):
# 删除聊天记录
@app.post("/langgraph/chat_remove/{thread_id}")
async def langgraph_chat(thread_id: str, checkpointer: AsyncPostgresSaverDep, session=AsyncSessionDep):
async def langgraph_chat(thread_id: str, checkpointer: AsyncPostgresSaverDep, session: AsyncSessionDep):
await ConversationService.item_delete(session=session, row_dict={"id": thread_id})
await checkpointer.adelete_thread(thread_id)
return {"result": "success"}