Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -57,7 +57,7 @@ def chat_completions():
|
|
57 |
|
58 |
streaming = request.json.get('stream', False)
|
59 |
|
60 |
-
auth = request.headers.get('
|
61 |
if auth != f'Bearer {settings["security"]["passw"]}':
|
62 |
if streaming:
|
63 |
er = 'Not authorized'
|
@@ -106,7 +106,7 @@ def chat_completions():
|
|
106 |
def v_chat_completions():
|
107 |
streaming = request.json.get('stream', False)
|
108 |
|
109 |
-
auth = request.headers.get('
|
110 |
if auth != f'Bearer {settings["security"]["passw"]}':
|
111 |
return json.dumps({'error':'Not authorized'})
|
112 |
|
|
|
57 |
|
58 |
streaming = request.json.get('stream', False)
|
59 |
|
60 |
+
auth = request.headers.get('Authorization', 'Bearer anonim')
|
61 |
if auth != f'Bearer {settings["security"]["passw"]}':
|
62 |
if streaming:
|
63 |
er = 'Not authorized'
|
|
|
106 |
def v_chat_completions():
|
107 |
streaming = request.json.get('stream', False)
|
108 |
|
109 |
+
auth = request.headers.get('Authorization', 'Bearer anonim')
|
110 |
if auth != f'Bearer {settings["security"]["passw"]}':
|
111 |
return json.dumps({'error':'Not authorized'})
|
112 |
|