mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Move CFG scale to built-in functionality
This commit is contained in:
@ -169,7 +169,7 @@ import { getDeviceInfo } from "./scripts/RossAscends-mods.js";
|
||||
import { registerPromptManagerMigration } from "./scripts/PromptManager.js";
|
||||
import { getRegexedString, regex_placement } from "./scripts/extensions/regex/engine.js";
|
||||
import { FILTER_TYPES, FilterHelper } from "./scripts/filters.js";
|
||||
import { getCfgPrompt, getGuidanceScale } from "./scripts/extensions/cfg/util.js";
|
||||
import { getCfgPrompt, getGuidanceScale, initCfg } from "./scripts/cfg-scale.js";
|
||||
import {
|
||||
force_output_sequence,
|
||||
formatInstructModeChat,
|
||||
@ -724,6 +724,7 @@ async function firstLoadInit() {
|
||||
initPersonas();
|
||||
initRossMods();
|
||||
initStats();
|
||||
initCfg();
|
||||
}
|
||||
|
||||
function checkOnlineStatus() {
|
||||
@ -3017,7 +3018,9 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
||||
: ` ${cfgPrompt.value}`;
|
||||
} else {
|
||||
// TODO: Make all extension prompts use an array/splice method
|
||||
finalMesSend[mesSend.length - cfgPrompt.depth].extensionPrompts.push(`${cfgPrompt.value}\n`);
|
||||
const lengthDiff = mesSend.length - cfgPrompt.depth;
|
||||
const cfgDepth = lengthDiff >= 0 ? lengthDiff : 0;
|
||||
finalMesSend[cfgDepth].extensionPrompts.push(`${cfgPrompt.value}\n`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user