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
1e038717
Commit
1e038717
authored
Mar 16, 2024
by
Timothy J. Baek
Browse files
fix: openai issue
parent
f90236f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
backend/apps/openai/main.py
backend/apps/openai/main.py
+6
-2
No files found.
backend/apps/openai/main.py
View file @
1e038717
...
@@ -144,7 +144,9 @@ async def speech(request: Request, user=Depends(get_verified_user)):
...
@@ -144,7 +144,9 @@ async def speech(request: Request, user=Depends(get_verified_user)):
except
:
except
:
error_detail
=
f
"External:
{
e
}
"
error_detail
=
f
"External:
{
e
}
"
raise
HTTPException
(
status_code
=
r
.
status_code
,
detail
=
error_detail
)
raise
HTTPException
(
status_code
=
r
.
status_code
if
r
else
500
,
detail
=
error_detail
)
except
ValueError
:
except
ValueError
:
raise
HTTPException
(
status_code
=
401
,
detail
=
ERROR_MESSAGES
.
OPENAI_NOT_FOUND
)
raise
HTTPException
(
status_code
=
401
,
detail
=
ERROR_MESSAGES
.
OPENAI_NOT_FOUND
)
...
@@ -328,4 +330,6 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
...
@@ -328,4 +330,6 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
except
:
except
:
error_detail
=
f
"External:
{
e
}
"
error_detail
=
f
"External:
{
e
}
"
raise
HTTPException
(
status_code
=
r
.
status_code
,
detail
=
error_detail
)
raise
HTTPException
(
status_code
=
r
.
status_code
if
r
else
500
,
detail
=
error_detail
)
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