mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix presets not respecting Claude source selection
This commit is contained in:
@ -1143,7 +1143,10 @@ function trySelectPresetByName(name) {
|
|||||||
|
|
||||||
async function saveOpenAIPreset(name, settings) {
|
async function saveOpenAIPreset(name, settings) {
|
||||||
const presetBody = {
|
const presetBody = {
|
||||||
|
chat_completion_source: settings.chat_completion_source,
|
||||||
openai_model: settings.openai_model,
|
openai_model: settings.openai_model,
|
||||||
|
claude_model: settings.claude_model,
|
||||||
|
windowai_model: settings.windowai_model,
|
||||||
temperature: settings.temp_openai,
|
temperature: settings.temp_openai,
|
||||||
frequency_penalty: settings.freq_pen_openai,
|
frequency_penalty: settings.freq_pen_openai,
|
||||||
presence_penalty: settings.pres_pen_openai,
|
presence_penalty: settings.pres_pen_openai,
|
||||||
@ -1167,9 +1170,6 @@ async function saveOpenAIPreset(name, settings) {
|
|||||||
max_context_unlocked: settings.max_context_unlocked,
|
max_context_unlocked: settings.max_context_unlocked,
|
||||||
nsfw_avoidance_prompt: settings.nsfw_avoidance_prompt,
|
nsfw_avoidance_prompt: settings.nsfw_avoidance_prompt,
|
||||||
wi_format: settings.wi_format,
|
wi_format: settings.wi_format,
|
||||||
claude_model: settings.claude_model,
|
|
||||||
windowai_model: settings.windowai_model,
|
|
||||||
chat_completion_source: settings.chat_completion_source,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const savePresetSettings = await fetch(`/savepreset_openai?name=${name}`, {
|
const savePresetSettings = await fetch(`/savepreset_openai?name=${name}`, {
|
||||||
@ -1457,7 +1457,7 @@ function onSettingsPresetChange() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(`#model_openai_select`).trigger('change');
|
$(`#chat_completion_source`).trigger('change');
|
||||||
$(`#openai_logit_bias_preset`).trigger('change');
|
$(`#openai_logit_bias_preset`).trigger('change');
|
||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
}
|
}
|
||||||
@ -1850,7 +1850,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
$('#oai_max_context_unlocked').on('input', function () {
|
$('#oai_max_context_unlocked').on('input', function () {
|
||||||
oai_settings.max_context_unlocked = !!$(this).prop('checked');
|
oai_settings.max_context_unlocked = !!$(this).prop('checked');
|
||||||
$("#model_openai_select").trigger('change');
|
$("#chat_completion_source").trigger('change');
|
||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user