Move auto_adjust_response_length logic

This if-block only applies to Kobold Horde, so move it inside the Kobold
and Horde-specific case in the else-if chain.
This commit is contained in:
valadaptive 2024-04-25 08:27:43 -04:00
parent 9fbb012697
commit fe663c4f04
1 changed files with 5 additions and 5 deletions

View File

@ -3906,13 +3906,13 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu
let thisPromptBits = [];
// TODO: Make this a switch
let generate_data;
if (main_api == 'koboldhorde' || main_api == 'kobold') {
if (main_api == 'koboldhorde' && horde_settings.auto_adjust_response_length) {
maxLength = Math.min(maxLength, adjustedParams.maxLength);
maxLength = Math.max(maxLength, MIN_LENGTH); // prevent validation errors
}
let generate_data;
if (main_api == 'koboldhorde' || main_api == 'kobold') {
generate_data = {
prompt: finalPrompt,
gui_settings: true,