mirror of
https://github.com/open-webui/open-webui
synced 2024-11-22 08:07:55 +00:00
chore: add additional headers only for Openrouter
This commit is contained in:
parent
6671e5f170
commit
bd82334647
@ -116,9 +116,9 @@ 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"
|
||||
|
||||
if "openrouter.ai" in app.state.OPENAI_API_BASE_URLS[idx]:
|
||||
headers['HTTP-Referer'] = "https://openwebui.com/"
|
||||
headers['X-Title'] = "Open WebUI"
|
||||
r = None
|
||||
try:
|
||||
r = requests.post(
|
||||
|
Loading…
Reference in New Issue
Block a user