Replace Macro in Custom Stopping Strings

Replaces user and char names in custom stopping strings, making them much more versatile and useful.

Example Use Case: Now you can use a custom stopping string like "\n*{{user}} " to stop generation when the AI tries to act as the user.
This commit is contained in:
SDS
2023-08-04 15:45:45 +02:00
committed by GitHub
parent cd8a24a712
commit 33af7ad266

View File

@ -1750,7 +1750,7 @@ function getStoppingStrings(isImpersonate, addSpace) {
if (power_user.custom_stopping_strings) {
const customStoppingStrings = getCustomStoppingStrings();
result.push(...customStoppingStrings);
result.push(...customStoppingStrings.map(x => substituteParams(x, name1, name2)));
}
return addSpace ? result.map(x => `${x} `) : result;