Merge branch 'staging' into wi-no-doube-substitution

This commit is contained in:
Cohee 2024-05-09 15:11:16 +03:00
commit 18d96bc346
1 changed files with 5 additions and 0 deletions

View File

@ -2535,6 +2535,11 @@ async function checkWorldInfo(chat, maxContext) {
const regexDepth = entry.position === world_info_position.atDepth ? (entry.depth ?? DEFAULT_DEPTH) : null;
const content = getRegexedString(entry.content, regex_placement.WORLD_INFO, { depth: regexDepth, isMarkdown: false, isPrompt: true });
if (!content) {
console.debug('Skipping adding WI entry to prompt due to empty content:', entry);
return;
}
switch (entry.position) {
case world_info_position.before:
WIBeforeEntries.unshift(substituteParams(content));