Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
bd823346
".github/git@developer.sourcefind.cn:change/sglang.git" did not exist on "3f2e315f6e5beb210b981ba07c4da88f703ccc50"
Commit
bd823346
authored
May 13, 2024
by
Alok Saboo
Browse files
chore: add additional headers only for Openrouter
parent
6671e5f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
backend/apps/openai/main.py
backend/apps/openai/main.py
+3
-3
No files found.
backend/apps/openai/main.py
View file @
bd823346
...
@@ -116,9 +116,9 @@ async def speech(request: Request, user=Depends(get_verified_user)):
...
@@ -116,9 +116,9 @@ async def speech(request: Request, user=Depends(get_verified_user)):
headers
=
{}
headers
=
{}
headers
[
"Authorization"
]
=
f
"Bearer
{
app
.
state
.
OPENAI_API_KEYS
[
idx
]
}
"
headers
[
"Authorization"
]
=
f
"Bearer
{
app
.
state
.
OPENAI_API_KEYS
[
idx
]
}
"
headers
[
"Content-Type"
]
=
"application/json"
headers
[
"Content-Type"
]
=
"application/json"
headers
[
'HTTP-Referer'
]
=
"https://openwebui.com/"
if
"openrouter.ai"
in
app
.
state
.
OPENAI_API_BASE_URLS
[
idx
]:
headers
[
'
X-Title'
]
=
"Open WebUI
"
headers
[
'
HTTP-Referer'
]
=
"https://openwebui.com/
"
headers
[
'X-Title'
]
=
"Open WebUI"
r
=
None
r
=
None
try
:
try
:
r
=
requests
.
post
(
r
=
requests
.
post
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment