mirror of
https://github.com/lanqian528/chat2api.git
synced 2026-06-13 21:02:46 +08:00
fix retry
This commit is contained in:
parent
e4afa3c697
commit
ee13f6a439
3
app.py
3
app.py
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user