diff --git a/public/instruct/Llama 2 Chat.json b/public/instruct/Llama 2 Chat.json
index 98cc04c4d..f7d035277 100644
--- a/public/instruct/Llama 2 Chat.json
+++ b/public/instruct/Llama 2 Chat.json
@@ -1,10 +1,10 @@
{
"name": "Llama 2 Chat",
- "system_prompt": "[INST] <>\nWrite {{char}}'s next reply in this fictional roleplay with {{user}}.\n<>\n",
+ "system_prompt": "Write {{char}}'s next reply in this fictional roleplay with {{user}}.",
"input_sequence": "[INST] ",
"output_sequence": " [/INST] ",
"last_output_sequence": "",
- "system_sequence": "[INST] <>\n",
+ "system_sequence": "[INST] <>\n{{sys}}\n<>\n",
"stop_sequence": "",
"separator_sequence": "\n",
"wrap": false,
diff --git a/public/scripts/instruct-mode.js b/public/scripts/instruct-mode.js
index 85b66ca48..86bcbac8a 100644
--- a/public/scripts/instruct-mode.js
+++ b/public/scripts/instruct-mode.js
@@ -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;