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
655238dc
"examples/nas/vscode:/vscode.git/clone" did not exist on "ef2069132cd7a9b0dd44aab2b93f18b470ac2eeb"
Commit
655238dc
authored
Jul 02, 2024
by
Michael Poluektov
Browse files
banners: generic exception
parent
16fa4545
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
backend/config.py
backend/config.py
+1
-2
No files found.
backend/config.py
View file @
655238dc
...
@@ -8,7 +8,6 @@ from chromadb import Settings
...
@@ -8,7 +8,6 @@ from chromadb import Settings
from
bs4
import
BeautifulSoup
from
bs4
import
BeautifulSoup
from
typing
import
TypeVar
,
Generic
from
typing
import
TypeVar
,
Generic
from
pydantic
import
BaseModel
from
pydantic
import
BaseModel
from
pydantic.error_wrappers
import
ValidationError
from
typing
import
Optional
from
typing
import
Optional
from
pathlib
import
Path
from
pathlib
import
Path
...
@@ -770,7 +769,7 @@ class BannerModel(BaseModel):
...
@@ -770,7 +769,7 @@ class BannerModel(BaseModel):
try
:
try
:
banners
=
json
.
loads
(
os
.
environ
.
get
(
"WEBUI_BANNERS"
,
"[]"
))
banners
=
json
.
loads
(
os
.
environ
.
get
(
"WEBUI_BANNERS"
,
"[]"
))
banners
=
[
BannerModel
(
**
banner
)
for
banner
in
banners
]
banners
=
[
BannerModel
(
**
banner
)
for
banner
in
banners
]
except
ValidationError
as
e
:
except
Exception
as
e
:
print
(
f
"Error loading WEBUI_BANNERS:
{
e
}
"
)
print
(
f
"Error loading WEBUI_BANNERS:
{
e
}
"
)
banners
=
[]
banners
=
[]
...
...
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