mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
World Info: Add global multi-selection/merging
Global world info always involved some kind of merging leading to extremely large lorebook files that took a long time to import. This commit adds the ability to select more than one world info file and they will be merged together along with character world info. In short, multiple worlds can be meshed together to further contribute to context. You can also use this for world "DLCs" of sorts. Let's say someone else has more information to add regarding a world, but doesn't want to use a large world file. The JSONs can now be merged. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@ -2033,7 +2033,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
||||
let chat2 = [];
|
||||
for (let i = coreChat.length - 1, j = 0; i >= 0; i--, j++) {
|
||||
// For OpenAI it's only used in WI
|
||||
if (main_api == 'openai' && !world_info) {
|
||||
if (main_api == 'openai' && (!world_info || world_info.length === 0)) {
|
||||
console.debug('No WI, skipping chat2 for OAI');
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user