Fix TC sysprompt leaking into CC prompts
This commit is contained in:
parent
7dd8229df6
commit
5b4d524bc0
|
@ -3527,12 +3527,14 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
|
|||
jailbreak,
|
||||
} = getCharacterCardFields();
|
||||
|
||||
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;
|
||||
} else {
|
||||
// Nullify if it's not enabled
|
||||
system = '';
|
||||
if (main_api !== 'openai') {
|
||||
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;
|
||||
} else {
|
||||
// Nullify if it's not enabled
|
||||
system = '';
|
||||
}
|
||||
}
|
||||
|
||||
// Depth prompt (character-specific A/N)
|
||||
|
@ -4359,7 +4361,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: power_user.sysprompt.enabled ? substituteParams(power_user.prefer_character_prompt && system ? system : power_user.sysprompt.content) : '',
|
||||
instruction: main_api !== 'openai' && 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 || '',
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue