Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -16,7 +16,7 @@ security = APIKeyHeader(name="api_key", auto_error=False)
|
|
16 |
|
17 |
def get_api_key(api_key: Optional[str] = Depends(security)):
|
18 |
if api_key is None or api_key != API_KEY:
|
19 |
-
raise HTTPException(status_code=401,
|
20 |
return api_key
|
21 |
|
22 |
def format_prompt(message, history):
|
|
|
16 |
|
17 |
def get_api_key(api_key: Optional[str] = Depends(security)):
|
18 |
if api_key is None or api_key != API_KEY:
|
19 |
+
raise HTTPException(status_code=401, detail="Unauthorized access")
|
20 |
return api_key
|
21 |
|
22 |
def format_prompt(message, history):
|