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
59ae5b6d
Commit
59ae5b6d
authored
Feb 27, 2024
by
Timothy J. Baek
Browse files
fix: openai filtering
parent
a36627cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
backend/apps/openai/main.py
backend/apps/openai/main.py
+1
-1
No files found.
backend/apps/openai/main.py
View file @
59ae5b6d
...
@@ -191,7 +191,7 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
...
@@ -191,7 +191,7 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
response_data
=
r
.
json
()
response_data
=
r
.
json
()
if
"openai"
in
app
.
state
.
OPENAI_API_BASE_URL
and
path
==
"models"
:
if
"
api.
openai
.com
"
in
app
.
state
.
OPENAI_API_BASE_URL
and
path
==
"models"
:
response_data
[
"data"
]
=
list
(
response_data
[
"data"
]
=
list
(
filter
(
lambda
model
:
"gpt"
in
model
[
"id"
],
response_data
[
"data"
])
filter
(
lambda
model
:
"gpt"
in
model
[
"id"
],
response_data
[
"data"
])
)
)
...
...
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