diff --git a/app.py b/app.py index 1e00470..4d26ed1 100644 --- a/app.py +++ b/app.py @@ -776,7 +776,8 @@ async def _analyzeDocument( if not allowed: raise HTTPException( status_code=429, - detail=f"Rate limit exceeded. Retry after {info['retryAfter']} seconds." + detail=f"Rate limit exceeded. Retry after {info['retryAfter']} seconds.", + headers={"Retry-After": str(int(info["retryAfter"]) + 1)}, ) try: # Get internal model name diff --git a/config.ini b/config.ini index baf9e7c..5253b71 100644 --- a/config.ini +++ b/config.ini @@ -21,5 +21,5 @@ AUTH_PASSWORD = poweron SECRET_KEY = c8bc1cede035171dedf01f220623e185aa8b83670ef607e97d928d271ac94200 # Rate Limiting -RATE_LIMIT_REQUESTS_PER_MINUTE = 60 -RATE_LIMIT_BURST_SIZE = 10 +RATE_LIMIT_REQUESTS_PER_MINUTE = 120 +RATE_LIMIT_BURST_SIZE = 30