Niansuh commited on
Commit
67de47e
·
verified ·
1 Parent(s): f7cbec9

Update api/utils.py

Browse files
Files changed (1) hide show
  1. api/utils.py +2 -2
api/utils.py CHANGED
@@ -156,7 +156,7 @@ async def process_streaming_response(request: ChatRequest):
156
  logger.error(f"HTTP error occurred for Chat ID {chat_id}: {e}")
157
  raise HTTPException(status_code=e.response.status_code, detail=str(e))
158
  except httpx.RequestError as e:
159
- logger.error(f"Error occurred during request for Chat ID {chat_id}: {e}")
160
  raise HTTPException(status_code=500, detail=str(e))
161
 
162
  # Process non-streaming response with headers from config.py
@@ -217,7 +217,7 @@ async def process_non_streaming_response(request: ChatRequest):
217
  logger.error(f"HTTP error occurred for Chat ID {chat_id}: {e}")
218
  raise HTTPException(status_code=e.response.status_code, detail=str(e))
219
  except httpx.RequestError as e:
220
- logger.error(f"Error occurred during request for Chat ID {chat_id}: {e}")
221
  raise HTTPException(status_code=500, detail=str(e))
222
 
223
  if full_response.startswith("$@$v=undefined-rv1$@$"):
 
156
  logger.error(f"HTTP error occurred for Chat ID {chat_id}: {e}")
157
  raise HTTPException(status_code=e.response.status_code, detail=str(e))
158
  except httpx.RequestError as e:
159
+ logger.error(f"Request error occurred for Chat ID {chat_id}: {e}")
160
  raise HTTPException(status_code=500, detail=str(e))
161
 
162
  # Process non-streaming response with headers from config.py
 
217
  logger.error(f"HTTP error occurred for Chat ID {chat_id}: {e}")
218
  raise HTTPException(status_code=e.response.status_code, detail=str(e))
219
  except httpx.RequestError as e:
220
+ logger.error(f"Request error occurred for Chat ID {chat_id}: {e}")
221
  raise HTTPException(status_code=500, detail=str(e))
222
 
223
  if full_response.startswith("$@$v=undefined-rv1$@$"):