Eric Xu commited on
Set rate limit to 2 runs per hour
Browse files- web/app.py +1 -1
web/app.py
CHANGED
|
@@ -140,7 +140,7 @@ def _llm_from_params(api_key: str = "", base_url: str = "", model: str = ""):
|
|
| 140 |
|
| 141 |
# Rate limiting — per-IP pipeline run counter (not per LLM call)
|
| 142 |
_rate_limits: dict = {} # ip -> {"count": N, "reset": timestamp}
|
| 143 |
-
RATE_LIMIT_MAX_RUNS =
|
| 144 |
RATE_LIMIT_WINDOW = 3600 # 1 hour
|
| 145 |
|
| 146 |
|
|
|
|
| 140 |
|
| 141 |
# Rate limiting — per-IP pipeline run counter (not per LLM call)
|
| 142 |
_rate_limits: dict = {} # ip -> {"count": N, "reset": timestamp}
|
| 143 |
+
RATE_LIMIT_MAX_RUNS = 2 # pipeline runs (evaluate, counterfactual, bias audit) per window
|
| 144 |
RATE_LIMIT_WINDOW = 3600 # 1 hour
|
| 145 |
|
| 146 |
|