fix retry

This commit is contained in:
LanQian 2024-04-30 06:38:52 +08:00
parent e4afa3c697
commit ee13f6a439

3
app.py
View File

@ -26,9 +26,10 @@ async def to_send_conversation(request_data, access_token):
try:
await chat_service.get_chat_requirements()
return chat_service
except Exception:
except HTTPException as e:
if chat_service.s.session:
await chat_service.close_client()
raise HTTPException(status_code=e.status_code, detail=e.detail)
@app.post("/v1/chat/completions")