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
49b4211c
Commit
49b4211c
authored
Jul 03, 2024
by
Michael Poluektov
Browse files
Merge branch 'dev' of
https://github.com/open-webui/open-webui
into dev
parents
24c7990f
2c061777
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
backend/config.py
backend/config.py
+8
-8
backend/requirements.txt
backend/requirements.txt
+1
-1
src/lib/components/admin/Settings/Pipelines.svelte
src/lib/components/admin/Settings/Pipelines.svelte
+4
-4
No files found.
backend/config.py
View file @
49b4211c
...
...
@@ -5,9 +5,8 @@ import importlib.metadata
import
pkgutil
import
chromadb
from
chromadb
import
Settings
from
base64
import
b64encode
from
bs4
import
BeautifulSoup
from
typing
import
TypeVar
,
Generic
,
Union
from
typing
import
TypeVar
,
Generic
from
pydantic
import
BaseModel
from
typing
import
Optional
...
...
@@ -19,7 +18,6 @@ import markdown
import
requests
import
shutil
from
secrets
import
token_bytes
from
constants
import
ERROR_MESSAGES
####################################
...
...
@@ -768,12 +766,14 @@ class BannerModel(BaseModel):
dismissible
:
bool
timestamp
:
int
try
:
banners
=
json
.
loads
(
os
.
environ
.
get
(
"WEBUI_BANNERS"
,
"[]"
))
banners
=
[
BannerModel
(
**
banner
)
for
banner
in
banners
]
except
Exception
as
e
:
print
(
f
"Error loading WEBUI_BANNERS:
{
e
}
"
)
banners
=
[]
WEBUI_BANNERS
=
PersistentConfig
(
"WEBUI_BANNERS"
,
"ui.banners"
,
[
BannerModel
(
**
banner
)
for
banner
in
json
.
loads
(
"[]"
)],
)
WEBUI_BANNERS
=
PersistentConfig
(
"WEBUI_BANNERS"
,
"ui.banners"
,
banners
)
SHOW_ADMIN_DETAILS
=
PersistentConfig
(
...
...
backend/requirements.txt
View file @
49b4211c
...
...
@@ -40,7 +40,7 @@ sentence-transformers==3.0.1
pypdf==4.2.0
docx2txt==0.8
python-pptx==0.6.23
unstructured==0.14.
0
unstructured==0.14.
9
Markdown==3.6
pypandoc==1.13
pandas==2.2.2
...
...
src/lib/components/admin/Settings/Pipelines.svelte
View file @
49b4211c
...
...
@@ -480,18 +480,18 @@
<!-- {valves[property]} -->
<div class="flex mt-0.5 mb-1.5 space-x-2">
<div class=" flex-1">
{#if valves
S
pec.properties[property]?.enum ?? null}
{#if valves
_s
pec.properties[property]?.enum ?? null}
<select
class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
bind:value={valves[property]}
>
{#each valves
S
pec.properties[property].enum as option}
{#each valves
_s
pec.properties[property].enum as option}
<option value={option} selected={option === valves[property]}>
{option}
</option>
{/each}
</select>
{:else if (valves
S
pec.properties[property]?.type ?? null) === 'boolean'}
{:else if (valves
_s
pec.properties[property]?.type ?? null) === 'boolean'}
<div class="flex justify-between items-center">
<div class="text-xs text-gray-500">
{valves[property] ? 'Enabled' : 'Disabled'}
...
...
@@ -505,7 +505,7 @@
<input
class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
type="text"
placeholder={valves
S
pec.properties[property].title}
placeholder={valves
_s
pec.properties[property].title}
bind:value={valves[property]}
autocomplete="off"
required
...
...
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