Replace {{name}} macro in system prompt prefix

This commit is contained in:
Cohee 2024-04-18 23:15:24 +03:00
parent 16a2ac0bbe
commit 0faa7d3c75
1 changed files with 3 additions and 1 deletions

View File

@ -354,7 +354,9 @@ export function formatInstructModeSystemPrompt(systemPrompt) {
const separator = power_user.instruct.wrap ? '\n' : '';
if (power_user.instruct.system_sequence_prefix) {
systemPrompt = power_user.instruct.system_sequence_prefix + separator + systemPrompt;
// TODO: Replace with a proper 'System' prompt entity name input
const prefix = power_user.instruct.system_sequence_prefix.replace(/{{name}}/gi, 'System');
systemPrompt = prefix + separator + systemPrompt;
}
if (power_user.instruct.system_sequence_suffix) {