mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-01 20:06:59 +01:00
system prompt in system sequence
This commit is contained in:
parent
582464a2e7
commit
56a6398189
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "Llama 2 Chat",
|
"name": "Llama 2 Chat",
|
||||||
"system_prompt": "[INST] <<SYS>>\nWrite {{char}}'s next reply in this fictional roleplay with {{user}}.\n<</SYS>>\n",
|
"system_prompt": "Write {{char}}'s next reply in this fictional roleplay with {{user}}.",
|
||||||
"input_sequence": "[INST] ",
|
"input_sequence": "[INST] ",
|
||||||
"output_sequence": " [/INST] ",
|
"output_sequence": " [/INST] ",
|
||||||
"last_output_sequence": "",
|
"last_output_sequence": "",
|
||||||
"system_sequence": "[INST] <<SYS>>\n",
|
"system_sequence": "[INST] <<SYS>>\n{{sys}}\n<</SYS>>\n",
|
||||||
"stop_sequence": "",
|
"stop_sequence": "",
|
||||||
"separator_sequence": "\n",
|
"separator_sequence": "\n",
|
||||||
"wrap": false,
|
"wrap": false,
|
||||||
|
@ -256,8 +256,13 @@ export function formatInstructModeChat(name, mes, isUser, isNarrator, forceAvata
|
|||||||
export function formatInstructModeSystemPrompt(systemPrompt){
|
export function formatInstructModeSystemPrompt(systemPrompt){
|
||||||
if (power_user.instruct.system_sequence) {
|
if (power_user.instruct.system_sequence) {
|
||||||
const separator = power_user.instruct.wrap ? '\n' : '';
|
const separator = power_user.instruct.wrap ? '\n' : '';
|
||||||
|
|
||||||
|
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 power_user.instruct.system_sequence + separator + systemPrompt;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return systemPrompt;
|
return systemPrompt;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user