Merge pull request #1676 from artisticMink/minor/nai-qol

Novel AI - Add eos token when textadventure module is selected
This commit is contained in:
Cohee 2024-01-12 01:28:31 +02:00 committed by GitHub
commit 6e07cf16df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -10,7 +10,7 @@ const API_NOVELAI = 'https://api.novelai.net';
// Ban bracket generation, plus defaults
const badWordsList = [
[3], [49356], [1431], [31715], [34387], [20765], [30702], [10691], [49333], [1266],
[19438], [43145], [26523], [41471], [2936], [85, 85], [49332], [7286], [1115],
[19438], [43145], [26523], [41471], [2936], [85, 85], [49332], [7286], [1115], [24],
];
const hypeBotBadWordsList = [
@ -175,6 +175,13 @@ router.post('/generate', jsonParser, async function (req, res) {
},
};
// Tells the model to stop generation at '>'
if ('theme_textadventure' === req.body.prefix &&
(true === req.body.model.includes('clio') ||
true === req.body.model.includes('kayra'))) {
data.parameters.eos_token_id = 49405;
}
console.log(util.inspect(data, { depth: 4 }));
const args = {