Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ from fastapi.responses import StreamingResponse
|
|
11 |
from httpx import AsyncClient, RequestError, Timeout
|
12 |
from starlette.types import Receive, Scope, Send
|
13 |
|
14 |
-
API_KEYS = [line for line in environ['API_KEYS'].strip().split('\n') if line and line.startswith('sk-')]
|
15 |
print(f'всего ключей: {len(API_KEYS)}')
|
16 |
COMPLETIONS_URL = 'https://openrouter.ai/api/v1/chat/completions'
|
17 |
app = FastAPI(title='reverse-proxy')
|
|
|
11 |
from httpx import AsyncClient, RequestError, Timeout
|
12 |
from starlette.types import Receive, Scope, Send
|
13 |
|
14 |
+
API_KEYS = ['bad_key'] + [line for line in environ['API_KEYS'].strip().split('\n') if line and line.startswith('sk-')]
|
15 |
print(f'всего ключей: {len(API_KEYS)}')
|
16 |
COMPLETIONS_URL = 'https://openrouter.ai/api/v1/chat/completions'
|
17 |
app = FastAPI(title='reverse-proxy')
|