From 4e301c1fcf4a0b6e2e797acaa3169d5ff4fe92f5 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期三, 08 一月 2025 13:50:52 +0800
Subject: [PATCH] sse
---
app/api/v2/chat.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/api/v2/chat.py b/app/api/v2/chat.py
index 95d2962..037b0ef 100644
--- a/app/api/v2/chat.py
+++ b/app/api/v2/chat.py
@@ -10,6 +10,6 @@
chat1_router = APIRouter()
-@chat1_router.get("/chat_dialog")
-async def api_chat_dialog(dialog: ChatDialogData, db: Session = Depends(get_db), current_user: UserModel = Depends(get_current_user)):
- return StreamingResponse(await service_chat_dialog(dialog.chatId ,dialog.question, dialog.sessionId), media_type="text/event-stream")
\ No newline at end of file
+@chat1_router.post("/chat_dialog")
+async def api_chat_dialog(dialog: ChatDialogData, db: Session = Depends(get_db)): # current_user: UserModel = Depends(get_current_user)
+ return StreamingResponse(service_chat_dialog(db, dialog.chatId ,dialog.question, dialog.sessionId, 1), media_type="text/event-stream")
\ No newline at end of file
--
Gitblit v1.8.0