Closed tarcs999 closed 9 months ago
I wasn't able to reproduce. Can you share your WI file?
I would have assumed the issue was some legacy setting in my install if it wasn't reproducing, but I tested again by freshly cloning, importing this lorebook to a fresh basic character, and sending "teach me fire and water magic" to it on a random Horde model. The issue persisted with the fire+water entries both appearing in the "further scenario details" section of the prompt
Thanks, I was able to identify and fix the issue. The problem was with checking for the already activated groups during recursion check not deactivating the group entries. It's available in the staging branch.
Thank you. Unfortunately I still seem to have the same problem on SillyTavern 1.11.2 'staging' (ead0aa65)
It seems like this snippet of filterByInclusionGroups()
is activating when it probably shouldn't be:
if (!Array.isArray(group) || group.length <= 1) {
console.debug('Skipping inclusion group check, only one entry');
continue;
}
Logs:
Character The Archivist lore (archivist lorebook) has 3 world info entries world-info.js:1612:13
WI using char first world-info.js:1667:25
Sorted 3 world lore entries using strategy 1 world-info.js:1683:17
0: water world-info.js:1795:29
WI UID 0 found by primary match: water. world-info.js:1798:33
WI UID 0: Activated without filter logic. world-info.js:1849:37
1: fire world-info.js:1795:29
WI UID 1 found by primary match: fire. world-info.js:1798:33
WI UID 1: Activated without filter logic. world-info.js:1849:37
2: earth world-info.js:1795:29
No active entries for logic checks for word: earth. world-info.js:1853:38
2: rock world-info.js:1795:29
No active entries for logic checks for word: rock. world-info.js:1853:38
-- INCLUSION GROUP CHECKS BEGIN -- world-info.js:1990:13
Checking inclusion group 'magic' with 2 entries
Array [ {…}, {…} ]
world-info.js:2005:17
Activated inclusion group 'magic' with entry '0'
Object { uid: 0, key: (1) […], keysecondary: [], comment: "water", content: "NOTE: Water magic is powerful yet serene. Be sure to comment on it.", constant: false, selective: true, selectiveLogic: 0, addMemo: true, order: 100, … }
world-info.js:2031:25
Removing loser from inclusion group 'magic' entry '1'
Object { uid: 1, key: (1) […], keysecondary: [], comment: "fire", content: "NOTE: Fire magic is fearsome and violent. Be sure to comment on it.", constant: false, selective: true, selectiveLogic: 0, addMemo: true, order: 100, … }
world-info.js:2048:21
-- PROBABILITY CHECKS BEGIN -- world-info.js:1867:17
uid:0 passed probability check, inserting to prompt world-info.js:1875:30
WI entry activated:
Object { uid: 0, key: (1) […], keysecondary: [], comment: "water", content: "NOTE: Water magic is powerful yet serene. Be sure to comment on it.", constant: false, selective: true, selectiveLogic: 0, addMemo: true, order: 100, … }
world-info.js:1891:21
1: fire world-info.js:1795:29
WI UID 1 found by primary match: fire. world-info.js:1798:33
WI UID 1: Activated without filter logic. world-info.js:1849:37
2: earth world-info.js:1795:29
No active entries for logic checks for word: earth. world-info.js:1853:38
2: rock world-info.js:1795:29
No active entries for logic checks for word: rock. world-info.js:1853:38
-- INCLUSION GROUP CHECKS BEGIN -- world-info.js:1990:13
Checking inclusion group 'magic' with 1 entries
Array [ {…} ]
world-info.js:2005:17
Skipping inclusion group check, only one entry world-info.js:2008:21
-- PROBABILITY CHECKS BEGIN -- world-info.js:1867:17
uid:1 passed probability check, inserting to prompt world-info.js:1875:30
WI entry activated:
Object { uid: 1, key: (1) […], keysecondary: [], comment: "fire", content: "NOTE: Fire magic is fearsome and violent. Be sure to comment on it.", constant: false, selective: true, selectiveLogic: 0, addMemo: true, order: 100, … }
world-info.js:1891:21
2: earth world-info.js:1795:29
No active entries for logic checks for word: earth. world-info.js:1853:38
2: rock world-info.js:1795:29
No active entries for logic checks for word: rock. world-info.js:1853:38
-- INCLUSION GROUP CHECKS BEGIN -- world-info.js:1990:13
No inclusion groups found world-info.js:2000:17
-- PROBABILITY CHECKS BEGIN -- world-info.js:1867:17
WI probability checks failed for all activated entries, stopping world-info.js:1897:21
No new entries activated, stopping
It seems like this snippet of filterByInclusionGroups() is activating when it probably shouldn't be:
Thanks. Looks like it.
Thanks, that seems to work!
Environment
Self-Hosted (Bare Metal)
System
Firefox 121
Version
SillyTavern 1.11.1 'release' (37d6f13b)
Desktop Information
No response
Describe the problem
When setting inclusion groups for lorebook entries, no mutually exclusive insertion is respected.
In both cases I would expect only a single entry (or zero entries if rolling low) to be included in the prompt, competing with weighted probability to be the winner.
Additional info
filterByInclusionGroups() seems to do its job correctly but somewhere else (in checkWorldInfo()?) seems to ignore the effect. Console logs filtered for "inclusion" look like this for the 100% trigger keyword-dependent magic test, with "fire" and "water" in the user's message:
World info message. also capable of having more than two conflicting entries:
Please tick the boxes