Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from fastapi.responses import StreamingResponse
|
|
| 10 |
from httpx import AsyncClient, RequestError, Timeout
|
| 11 |
from starlette.types import Receive, Scope, Send
|
| 12 |
|
| 13 |
-
API_KEYS = [
|
| 14 |
COMPLETIONS_URL = 'https://openrouter.ai/api/v1/chat/completions'
|
| 15 |
app = FastAPI(title='reverse-proxy')
|
| 16 |
|
|
|
|
| 10 |
from httpx import AsyncClient, RequestError, Timeout
|
| 11 |
from starlette.types import Receive, Scope, Send
|
| 12 |
|
| 13 |
+
API_KEYS = [line for line in environ['API_KEYS'].strip().split('\n') if line and line.startswith('sk-')]
|
| 14 |
COMPLETIONS_URL = 'https://openrouter.ai/api/v1/chat/completions'
|
| 15 |
app = FastAPI(title='reverse-proxy')
|
| 16 |
|