Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -119,6 +119,7 @@ async def proxy_openai_api(request: Request):
|
|
119 |
streaming = client.stream(request.method, COMPLETIONS_URL, headers=headers, params=request.query_params, json=request_body)
|
120 |
async with streaming as stream_response:
|
121 |
if stream_response.status_code in {401, 402, 429}:
|
|
|
122 |
yield 'auth_error'
|
123 |
return
|
124 |
if stream_response.status_code == 403:
|
|
|
119 |
streaming = client.stream(request.method, COMPLETIONS_URL, headers=headers, params=request.query_params, json=request_body)
|
120 |
async with streaming as stream_response:
|
121 |
if stream_response.status_code in {401, 402, 429}:
|
122 |
+
print(api_key, 'не валиден')
|
123 |
yield 'auth_error'
|
124 |
return
|
125 |
if stream_response.status_code == 403:
|