Spaces:
Sleeping
Sleeping
Max 2 key attempts
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ def get_healthy_keys(max_failures=2):
|
|
| 50 |
v["failures"] = 0
|
| 51 |
v["healthy"] = True
|
| 52 |
return OLLAMA_KEYS[:3]
|
| 53 |
-
return healthy[:
|
| 54 |
|
| 55 |
@app.post("/v1/chat/completions")
|
| 56 |
async def chat(req: Request):
|
|
|
|
| 50 |
v["failures"] = 0
|
| 51 |
v["healthy"] = True
|
| 52 |
return OLLAMA_KEYS[:3]
|
| 53 |
+
return healthy[:2] # Only try top 3
|
| 54 |
|
| 55 |
@app.post("/v1/chat/completions")
|
| 56 |
async def chat(req: Request):
|