Browse Source

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

Alok Saboo 11 tháng trước cách đây
mục cha
commit
6671e5f170
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      backend/apps/openai/main.py

+ 2 - 0
backend/apps/openai/main.py

@@ -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: