mirror of
https://github.com/open-webui/open-webui
synced 2025-06-23 02:16:52 +00:00
fix: model editor system not being preserved
This commit is contained in:
parent
a22be555cb
commit
8f67ffabbd
@ -56,6 +56,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
let system = '';
|
||||
let info = {
|
||||
id: '',
|
||||
base_model_id: null,
|
||||
@ -155,6 +156,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
info.params.system = system.trim() === '' ? null : system;
|
||||
info.params.stop = params.stop ? params.stop.split(',').filter((s) => s.trim()) : null;
|
||||
Object.keys(info.params).forEach((key) => {
|
||||
if (info.params[key] === '' || info.params[key] === null) {
|
||||
@ -201,6 +203,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
system = model?.params?.system ?? '';
|
||||
|
||||
params = { ...params, ...model?.params };
|
||||
params.stop = params?.stop
|
||||
? (typeof params.stop === 'string' ? params.stop.split(',') : (params?.stop ?? [])).join(
|
||||
@ -553,7 +557,7 @@
|
||||
className=" text-sm w-full bg-transparent outline-hidden resize-none overflow-y-hidden "
|
||||
placeholder={`Write your model system prompt content here\ne.g.) You are Mario from Super Mario Bros, acting as an assistant.`}
|
||||
rows={4}
|
||||
bind:value={info.params.system}
|
||||
bind:value={system}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user