Save prompt manager items to perset
This commit is contained in:
parent
2054cbeb83
commit
e908610b99
|
@ -5151,6 +5151,9 @@ async function getSettings(type) {
|
|||
// Load context templates
|
||||
loadContextTemplatesFromSettings(data, settings);
|
||||
|
||||
// Allow subscribers to mutate settings
|
||||
eventSource.emit(event_types.SETTINGS_LOADED_AFTER, settings);
|
||||
|
||||
// Set context size after loading power user (may override the max value)
|
||||
$("#max_context").val(max_context);
|
||||
$("#max_context_counter").text(`${max_context}`);
|
||||
|
|
|
@ -1739,6 +1739,9 @@ async function saveOpenAIPreset(name, settings) {
|
|||
nsfw_avoidance_prompt: settings.nsfw_avoidance_prompt,
|
||||
wi_format: settings.wi_format,
|
||||
stream_openai: settings.stream_openai,
|
||||
prompts: settings.prompts,
|
||||
prompt_lists: settings.prompt_lists,
|
||||
prompt_manager_settings: settings.prompt_manager_settings
|
||||
api_url_scale: settings.api_url_scale,
|
||||
show_external_models: settings.show_external_models,
|
||||
assistant_prefill: settings.assistant_prefill,
|
||||
|
@ -2066,6 +2069,10 @@ function onSettingsPresetChange() {
|
|||
nsfw_avoidance_prompt: ['#nsfw_avoidance_prompt_textarea', 'nsfw_avoidance_prompt', false],
|
||||
wi_format: ['#wi_format_textarea', 'wi_format', false],
|
||||
stream_openai: ['#stream_toggle', 'stream_openai', true],
|
||||
prompts: ['', 'prompts', false],
|
||||
prompt_lists: ['', 'prompt_lists', false],
|
||||
prompt_manager_settings: ['', 'prompt_manager_settings', false],
|
||||
use_openrouter: ['#use_openrouter', 'use_openrouter', true],
|
||||
api_url_scale: ['#api_url_scale', 'api_url_scale', false],
|
||||
show_external_models: ['#openai_show_external_models', 'show_external_models', true],
|
||||
proxy_password: ['#openai_proxy_password', 'proxy_password', false],
|
||||
|
@ -2085,6 +2092,9 @@ function onSettingsPresetChange() {
|
|||
|
||||
$(`#chat_completion_source`).trigger('change');
|
||||
$(`#openai_logit_bias_preset`).trigger('change');
|
||||
|
||||
eventSource.emit(event_types.OAI_PRESET_CHANGED, oai_settings);
|
||||
|
||||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue