Fix TC sysprompt leaking into CC prompts
| @@ -3527,6 +3527,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro | ||
| 3527 | 3527 | jailbreak, |
| 3528 | 3528 | } = getCharacterCardFields(); |
| 3529 | 3529 | |
| 3530 | + if (main_api !== 'openai') { | |
| 3530 | 3531 | if (power_user.sysprompt.enabled) { |
| 3531 | 3532 | system = power_user.prefer_character_prompt && system ? system : baseChatReplace(power_user.sysprompt.content, name1, name2); |
| 3532 | 3533 | system = isInstruct ? formatInstructModeSystemPrompt(substituteParams(system, name1, name2, power_user.sysprompt.content)) : system; |
| @@ -3534,6 +3535,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro | ||
| 3534 | 3535 | // Nullify if it's not enabled |
| 3535 | 3536 | system = ''; |
| 3536 | 3537 | } |
| 3538 | + } | |
| 3537 | 3539 | |
| 3538 | 3540 | // Depth prompt (character-specific A/N) |
| 3539 | 3541 | removeDepthPrompts(); |
| @@ -4359,7 +4361,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro | ||
| 4359 | 4361 | this_max_context: this_max_context, |
| 4360 | 4362 | padding: power_user.token_padding, |
| 4361 | 4363 | main_api: main_api, |
| 4362 | 4364 | instruction: main_api !== 'openai' && power_user.sysprompt.enabled ? substituteParams(power_user.prefer_character_prompt && system ? system : power_user.sysprompt.content) : '', |
| 4363 | 4365 | userPersona: (power_user.persona_description_position == persona_description_positions.IN_PROMPT ? (persona || '') : ''), |
| 4364 | 4366 | tokenizer: getFriendlyTokenizerName(main_api).tokenizerName || '', |
| 4365 | 4367 | }; |