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
"test/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "54118c34aa03b22580633c5f4faf7dc57c65de80"
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
...
@@ -5,9 +5,8 @@ import importlib.metadata
import
pkgutil
import
pkgutil
import
chromadb
import
chromadb
from
chromadb
import
Settings
from
chromadb
import
Settings
from
base64
import
b64encode
from
bs4
import
BeautifulSoup
from
bs4
import
BeautifulSoup
from
typing
import
TypeVar
,
Generic
,
Union
from
typing
import
TypeVar
,
Generic
from
pydantic
import
BaseModel
from
pydantic
import
BaseModel
from
typing
import
Optional
from
typing
import
Optional
...
@@ -19,7 +18,6 @@ import markdown
...
@@ -19,7 +18,6 @@ import markdown
import
requests
import
requests
import
shutil
import
shutil
from
secrets
import
token_bytes
from
constants
import
ERROR_MESSAGES
from
constants
import
ERROR_MESSAGES
####################################
####################################
...
@@ -768,12 +766,14 @@ class BannerModel(BaseModel):
...
@@ -768,12 +766,14 @@ class BannerModel(BaseModel):
dismissible
:
bool
dismissible
:
bool
timestamp
:
int
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
=
PersistentConfig
(
"WEBUI_BANNERS"
,
"ui.banners"
,
banners
)
"WEBUI_BANNERS"
,
"ui.banners"
,
[
BannerModel
(
**
banner
)
for
banner
in
json
.
loads
(
"[]"
)],
)
SHOW_ADMIN_DETAILS
=
PersistentConfig
(
SHOW_ADMIN_DETAILS
=
PersistentConfig
(
...
...
backend/requirements.txt
View file @
49b4211c
...
@@ -40,7 +40,7 @@ sentence-transformers==3.0.1
...
@@ -40,7 +40,7 @@ sentence-transformers==3.0.1
pypdf==4.2.0
pypdf==4.2.0
docx2txt==0.8
docx2txt==0.8
python-pptx==0.6.23
python-pptx==0.6.23
unstructured==0.14.
0
unstructured==0.14.
9
Markdown==3.6
Markdown==3.6
pypandoc==1.13
pypandoc==1.13
pandas==2.2.2
pandas==2.2.2
...
...
src/lib/components/admin/Settings/Pipelines.svelte
View file @
49b4211c
...
@@ -480,18 +480,18 @@
...
@@ -480,18 +480,18 @@
<!-- {valves[property]} -->
<!-- {valves[property]} -->
<div class="flex mt-0.5 mb-1.5 space-x-2">
<div class="flex mt-0.5 mb-1.5 space-x-2">
<div class=" flex-1">
<div class=" flex-1">
{#if valves
S
pec.properties[property]?.enum ?? null}
{#if valves
_s
pec.properties[property]?.enum ?? null}
<select
<select
class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
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]}
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 value={option} selected={option === valves[property]}>
{option}
{option}
</option>
</option>
{/each}
{/each}
</select>
</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="flex justify-between items-center">
<div class="text-xs text-gray-500">
<div class="text-xs text-gray-500">
{valves[property] ? 'Enabled' : 'Disabled'}
{valves[property] ? 'Enabled' : 'Disabled'}
...
@@ -505,7 +505,7 @@
...
@@ -505,7 +505,7 @@
<input
<input
class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
type="text"
type="text"
placeholder={valves
S
pec.properties[property].title}
placeholder={valves
_s
pec.properties[property].title}
bind:value={valves[property]}
bind:value={valves[property]}
autocomplete="off"
autocomplete="off"
required
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