Add instruct mode sequence macros

This commit is contained in:
Cohee
2023-11-26 16:37:05 +02:00
parent 3bc91f10ec
commit fb08552d46
3 changed files with 46 additions and 0 deletions

View File

@ -186,6 +186,7 @@ import {
getInstructStoppingSequences,
autoSelectInstructPreset,
formatInstructModeSystemPrompt,
replaceInstructMacros,
} from "./scripts/instruct-mode.js";
import { applyLocale } from "./scripts/i18n.js";
import { getFriendlyTokenizerName, getTokenCount, getTokenizerModel, initTokenizers, saveTokenCache } from "./scripts/tokenizers.js";
@ -2013,6 +2014,7 @@ function substituteParams(content, _name1, _name2, _original, _group, _replaceCh
}
content = diceRollReplace(content);
content = randomReplace(content);
content = replaceInstructMacros(content);
content = replaceVariableMacros(content);
content = content.replace(/{{newline}}/gi, "\n");
content = content.replace(/{{input}}/gi, String($('#send_textarea').val()));