| | |
| | | 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") |
| | | @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") |