mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 17:36:22 +01:00
Correct identifier used for jailbreak prompt override
This commit is contained in:
parent
e91e1996b1
commit
c920b6c511
@ -206,14 +206,14 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
|
||||
|
||||
// Apply character specific overrides for prompts
|
||||
eventSource.on(event_types.OAI_BEFORE_CHATCOMPLETION, (prompts) => {
|
||||
const systemPromptOverride = this.activeCharacter.data.system_prompt ?? null;
|
||||
const systemPromptOverride = this.activeCharacter.data?.system_prompt ?? null;
|
||||
const systemPrompt = prompts.get('main') ?? null;
|
||||
if (systemPromptOverride) {
|
||||
systemPrompt.content = systemPromptOverride;
|
||||
prompts.set(systemPrompt, prompts.index('main'));
|
||||
}
|
||||
|
||||
const jailbreakPromptOverride = this.activeCharacter.data.system_prompt ?? null;
|
||||
const jailbreakPromptOverride = this.activeCharacter.data?.jailbreak_prompt ?? null;
|
||||
const jailbreakPrompt = prompts.get('jailbreak') ?? null;
|
||||
if (jailbreakPromptOverride && jailbreakPrompt) {
|
||||
jailbreakPrompt.content = jailbreakPromptOverride;
|
||||
|
Loading…
Reference in New Issue
Block a user