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
943baad6
"src/onnx/parse_splitToSequence.cpp" did not exist on "651ea160b2c2445250dbc03bb9ad5030d91d59f5"
Commit
943baad6
authored
May 28, 2024
by
Timothy J. Baek
Browse files
feat: allow valve pipelines edit
parent
2bdfd851
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
backend/main.py
backend/main.py
+2
-2
src/lib/components/admin/Settings/Pipelines.svelte
src/lib/components/admin/Settings/Pipelines.svelte
+8
-0
No files found.
backend/main.py
View file @
943baad6
...
@@ -250,8 +250,8 @@ class PipelineMiddleware(BaseHTTPMiddleware):
...
@@ -250,8 +250,8 @@ class PipelineMiddleware(BaseHTTPMiddleware):
and
(
and
(
model
[
"pipeline"
][
"pipelines"
]
==
[
"*"
]
model
[
"pipeline"
][
"pipelines"
]
==
[
"*"
]
or
any
(
or
any
(
model_id
==
target_model
[
"id"
]
model_id
==
target_model
_id
for
target_model
in
model
[
"pipeline"
][
"pipelines"
]
for
target_model
_id
in
model
[
"pipeline"
][
"pipelines"
]
)
)
)
)
]
]
...
...
src/lib/components/admin/Settings/Pipelines.svelte
View file @
943baad6
...
@@ -32,6 +32,10 @@
...
@@ -32,6 +32,10 @@
const pipeline = pipelines[selectedPipelineIdx];
const pipeline = pipelines[selectedPipelineIdx];
if (pipeline && (pipeline?.pipeline?.valves ?? false)) {
if (pipeline && (pipeline?.pipeline?.valves ?? false)) {
if (valves?.pipelines ?? false) {
valves.pipelines = valves.pipelines.split(',').map((v) => v.trim());
}
const res = await updatePipelineValves(localStorage.token, pipeline.id, valves).catch(
const res = await updatePipelineValves(localStorage.token, pipeline.id, valves).catch(
(error) => {
(error) => {
toast.error(error);
toast.error(error);
...
@@ -52,6 +56,10 @@
...
@@ -52,6 +56,10 @@
const getValves = async (idx) => {
const getValves = async (idx) => {
valves_spec = await getPipelineValvesSpec(localStorage.token, pipelines[idx].id);
valves_spec = await getPipelineValvesSpec(localStorage.token, pipelines[idx].id);
valves = await getPipelineValves(localStorage.token, pipelines[idx].id);
valves = await getPipelineValves(localStorage.token, pipelines[idx].id);
if (valves?.pipelines ?? false) {
valves.pipelines = valves.pipelines.join(',');
}
};
};
const setPipelines = async () => {
const setPipelines = async () => {
...
...
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