chore: add HTTP-Referer and X-Title headers for Open WebUI

This commit is contained in:
Alok Saboo 2024-05-12 14:05:38 -04:00
parent 90503be2ed
commit 6671e5f170

View File

@ -116,6 +116,8 @@ async def speech(request: Request, user=Depends(get_verified_user)):
headers = {}
headers["Authorization"] = f"Bearer {app.state.OPENAI_API_KEYS[idx]}"
headers["Content-Type"] = "application/json"
headers['HTTP-Referer'] = "https://openwebui.com/"
headers['X-Title'] = "Open WebUI"
r = None
try: