refac: openai allow empty key

This commit is contained in:
Timothy J. Baek
2024-05-29 01:12:25 -07:00
parent 943baad689
commit e8d4e03c0d
5 changed files with 91 additions and 44 deletions

View File

@@ -407,9 +407,6 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
target_url = f"{url}/{path}"
if key == "":
raise HTTPException(status_code=401, detail=ERROR_MESSAGES.API_KEY_NOT_FOUND)
headers = {}
headers["Authorization"] = f"Bearer {key}"
headers["Content-Type"] = "application/json"