system prompt in system sequence

This commit is contained in:
Stefan Daniel Schwarz
2023-08-24 19:33:04 +02:00
parent 582464a2e7
commit 56a6398189
2 changed files with 8 additions and 3 deletions

View File

@ -256,7 +256,12 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata
export function formatInstructModeSystemPrompt(systemPrompt){
if (power_user.instruct.system_sequence) {
const separator = power_user.instruct.wrap ? '\n' : '';
return power_user.instruct.system_sequence + separator + systemPrompt;
if (power_user.instruct.system_sequence.includes("{{sys}}")) {
return power_user.instruct.system_sequence.replace(/{{sys}}/gi, systemPrompt) + separator;
} else {
return power_user.instruct.system_sequence + separator + systemPrompt;
}
}
return systemPrompt;