mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 13:40:55 +00:00
feat: allow valve pipelines edit
This commit is contained in:
parent
2bdfd85137
commit
943baad689
@ -250,8 +250,8 @@ class PipelineMiddleware(BaseHTTPMiddleware):
|
||||
and (
|
||||
model["pipeline"]["pipelines"] == ["*"]
|
||||
or any(
|
||||
model_id == target_model["id"]
|
||||
for target_model in model["pipeline"]["pipelines"]
|
||||
model_id == target_model_id
|
||||
for target_model_id in model["pipeline"]["pipelines"]
|
||||
)
|
||||
)
|
||||
]
|
||||
|
@ -32,6 +32,10 @@
|
||||
const pipeline = pipelines[selectedPipelineIdx];
|
||||
|
||||
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(
|
||||
(error) => {
|
||||
toast.error(error);
|
||||
@ -52,6 +56,10 @@
|
||||
const getValves = async (idx) => {
|
||||
valves_spec = await getPipelineValvesSpec(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 () => {
|
||||
|
Loading…
Reference in New Issue
Block a user