mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Decouple system prompts from instruct mode
This commit is contained in:
@ -3515,9 +3515,9 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
|
||||
jailbreak,
|
||||
} = getCharacterCardFields();
|
||||
|
||||
if (isInstruct) {
|
||||
system = power_user.prefer_character_prompt && system ? system : baseChatReplace(power_user.instruct.system_prompt, name1, name2);
|
||||
system = formatInstructModeSystemPrompt(substituteParams(system, name1, name2, power_user.instruct.system_prompt));
|
||||
if (power_user.sysprompt.enabled) {
|
||||
system = power_user.prefer_character_prompt && system ? system : baseChatReplace(power_user.sysprompt.content, name1, name2);
|
||||
system = isInstruct ? formatInstructModeSystemPrompt(substituteParams(system, name1, name2, power_user.sysprompt.content)) : system;
|
||||
}
|
||||
|
||||
// Depth prompt (character-specific A/N)
|
||||
@ -4344,7 +4344,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
|
||||
this_max_context: this_max_context,
|
||||
padding: power_user.token_padding,
|
||||
main_api: main_api,
|
||||
instruction: isInstruct ? substituteParams(power_user.prefer_character_prompt && system ? system : power_user.instruct.system_prompt) : '',
|
||||
instruction: power_user.sysprompt.enabled ? substituteParams(power_user.prefer_character_prompt && system ? system : power_user.sysprompt.content) : '',
|
||||
userPersona: (power_user.persona_description_position == persona_description_positions.IN_PROMPT ? (persona || '') : ''),
|
||||
tokenizer: getFriendlyTokenizerName(main_api).tokenizerName || '',
|
||||
};
|
||||
|
Reference in New Issue
Block a user