Turn on instruct mode for NAI
This commit is contained in:
parent
b107848ccb
commit
732707ae2b
|
@ -253,6 +253,7 @@ const sliders = [
|
|||
];
|
||||
|
||||
export function getNovelGenerationData(finalPromt, this_settings, this_amount_gen) {
|
||||
const isNewModel = (nai_settings.model_novel.includes('clio') || nai_settings.model_novel.includes('kayra'));
|
||||
return {
|
||||
"input": finalPromt,
|
||||
"model": nai_settings.model_novel,
|
||||
|
@ -279,7 +280,7 @@ export function getNovelGenerationData(finalPromt, this_settings, this_amount_ge
|
|||
"use_cache": false,
|
||||
"use_string": true,
|
||||
"return_full_text": false,
|
||||
"prefix": "vanilla",
|
||||
"prefix": isNewModel ? "special_instruct" : "vanilla",
|
||||
"order": this_settings.order,
|
||||
"streaming": nai_settings.streaming_novel,
|
||||
};
|
||||
|
|
|
@ -1786,7 +1786,7 @@ app.post("/generate_novelai", jsonParser, async function (request, response_gene
|
|||
|
||||
console.log(request.body);
|
||||
const bw = require('./src/bad-words');
|
||||
const bad_words_ids = (request.body.model.includes('clio') || request.body.model.includes('kayra')) ? bw.clioBadWordsId : bw.badWordIds;
|
||||
const isNewModel = (request.body.model.includes('clio') || request.body.model.includes('kayra'));
|
||||
const data = {
|
||||
"input": request.body.input,
|
||||
"model": request.body.model,
|
||||
|
@ -1809,12 +1809,12 @@ app.post("/generate_novelai", jsonParser, async function (request, response_gene
|
|||
"cfg_uc": request.body.cfg_uc,
|
||||
"phrase_rep_pen": request.body.phrase_rep_pen,
|
||||
//"stop_sequences": {{187}},
|
||||
"bad_words_ids": bad_words_ids,
|
||||
"bad_words_ids": isNewModel ? bw.clioBadWordsId : bw.badWordIds,
|
||||
//generate_until_sentence = true;
|
||||
"use_cache": request.body.use_cache,
|
||||
"use_string": true,
|
||||
"return_full_text": request.body.return_full_text,
|
||||
"prefix": request.body.prefix,
|
||||
"prefix": isNewModel ? "special_instruct" : request.body.prefix,
|
||||
"order": request.body.order
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue