Fix banned tokens not working for Erato

8775247942cf86f48c1664b8bc0b119466d06d06

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -3Ignore whitespace
src/endpoints/novelai.js+3 -3
@@ -116,10 +116,10 @@ router.post('/generate', jsonParser, async function (req, res) {
116116 controller.abort();
117117 });
118118
119119 const isNewModel = (req.body.model.includes('clio') || req.body.model.includes('kayra') || req.body.model.includes('erato'));
120120 const badWordsList = getBadWordsList(req.body.model);
121121
122122 // Add customized bad words for Clio, Kayra, and KayraErato
123123 if (isNewModel && Array.isArray(req.body.bad_words_ids)) {
124124 for (const badWord of req.body.bad_words_ids) {
125125 if (Array.isArray(badWord) && badWord.every(x => Number.isInteger(x))) {
@@ -183,7 +183,7 @@ router.post('/generate', jsonParser, async function (req, res) {
183183 };
184184
185185 // Tells the model to stop generation at '>'
186186 if ('theme_textadventure' === req.body.prefix && isNewModel && !req.body.model.includes('erato')) {
187187 data.parameters.eos_token_id = 49405;
188188 }
189189