Fix textgen generation

This commit is contained in:
SillyLossy
2023-04-07 17:59:50 +03:00
parent 28560f6e31
commit 8f23c72b4e

View File

@ -1584,32 +1584,27 @@ async function Generate(type, automatic_trigger, force_name2) {//encode("dsfs").
} }
if (main_api == 'textgenerationwebui') { if (main_api == 'textgenerationwebui') {
var generate_data = { let data = [
data: [ finalPromt,
finalPromt, {
this_amount_gen, // max new tokens 'max_new_tokens': this_amount_gen,
textgenerationwebui_settings.do_sample, // do_sample 'do_sample': textgenerationwebui_settings.do_sample,
textgenerationwebui_settings.temp, // temperature 'temperature': textgenerationwebui_settings.temp,
textgenerationwebui_settings.top_p, // top_p 'top_p': textgenerationwebui_settings.top_p,
textgenerationwebui_settings.typical_p, // typical_p 'typical_p': textgenerationwebui_settings.typical_p,
textgenerationwebui_settings.rep_pen, // repetition_penalty 'repetition_penalty': textgenerationwebui_settings.rep_pen,
textgenerationwebui_settings.encoder_rep_pen, // encoder rep pen 'encoder_repetition_penalty': textgenerationwebui_settings.encoder_rep_pen,
textgenerationwebui_settings.top_k, // top_k 'top_k': textgenerationwebui_settings.top_k,
textgenerationwebui_settings.min_length, // min_length 'min_length': textgenerationwebui_settings.min_length,
textgenerationwebui_settings.no_repeat_ngram_size, // no_repeat_ngram_size 'no_repeat_ngram_size': textgenerationwebui_settings.no_repeat_ngram_size,
textgenerationwebui_settings.num_beams, // num_beams 'num_beams': textgenerationwebui_settings.num_beams,
textgenerationwebui_settings.penalty_alpha, // penalty_alpha 'penalty_alpha': textgenerationwebui_settings.penalty_alpha,
textgenerationwebui_settings.length_penalty, // length_penalty 'length_penalty': textgenerationwebui_settings.length_penalty,
textgenerationwebui_settings.early_stopping, // early_stopping 'early_stopping': textgenerationwebui_settings.early_stopping,
textgenerationwebui_settings.seed, // seed 'seed': textgenerationwebui_settings.seed,
name1, // name1 }
name2, // name2 ];
"", // Context generate_data = { "data": [ JSON.stringify(data) ]};
true, // stop at newline
this_max_context, // Maximum prompt size in tokens
1, // num attempts
]
};
} }
if (main_api == 'novel') { if (main_api == 'novel') {