Don't modify response length when changing mancer model

This commit is contained in:
Cohee 2024-05-17 00:19:43 +03:00
parent 719202ba12
commit 71a3e2c91b
2 changed files with 4 additions and 10 deletions

View File

@ -6226,20 +6226,14 @@ export async function saveSettings(type) {
});
}
export function setGenerationParamsFromPreset(preset, isMancerChange = null) {
export function setGenerationParamsFromPreset(preset) {
const needsUnlock = (preset.max_length ?? max_context) > MAX_CONTEXT_DEFAULT || (preset.genamt ?? amount_gen) > MAX_RESPONSE_DEFAULT;
$('#max_context_unlocked').prop('checked', needsUnlock).trigger('change');
if (preset.genamt !== undefined) {
amount_gen = preset.genamt;
if (isMancerChange) {
$('#amount_gen').attr('max', amount_gen);
$('#amount_gen_counter').val($('#amount_gen').val());
}
else {
$('#amount_gen').val(amount_gen);
$('#amount_gen_counter').val(amount_gen);
}
$('#amount_gen').val(amount_gen);
$('#amount_gen_counter').val(amount_gen);
}
if (preset.max_length !== undefined) {

View File

@ -237,7 +237,7 @@ function onMancerModelSelect() {
$('#api_button_textgenerationwebui').trigger('click');
const limits = mancerModels.find(x => x.id === modelId)?.limits;
setGenerationParamsFromPreset({ max_length: limits.context, genamt: limits.completion }, true);
setGenerationParamsFromPreset({ max_length: limits.context });
}
function onTogetherModelSelect() {