Update app.py
Browse files
app.py
CHANGED
|
@@ -279,7 +279,8 @@ async def handleNewConv(new_conv: NewConv, uid: str = Depends(verify_access_toke
|
|
| 279 |
|
| 280 |
|
| 281 |
@app.post("/gen_resp")
|
| 282 |
-
async def handleChat(chat_request: ChatRequest, uid: str = Depends(verify_access_token)):
|
|
|
|
| 283 |
conv_id = chat_request.conv_id
|
| 284 |
if conv_id not in convs:
|
| 285 |
raise HTTPException(status_code=404, detail="Conversation not found")
|
|
|
|
| 279 |
|
| 280 |
|
| 281 |
@app.post("/gen_resp")
|
| 282 |
+
async def handleChat(chat_request: ChatRequest, uid: str = Depends(verify_access_token)):
|
| 283 |
+
convs = users[uid]["sessions"]
|
| 284 |
conv_id = chat_request.conv_id
|
| 285 |
if conv_id not in convs:
|
| 286 |
raise HTTPException(status_code=404, detail="Conversation not found")
|