Merge pull request #1012 from StefanDanielSchwarz/llama-2-chat-instruct-preset-fixes
Llama 2 chat instruct preset fixes
This commit is contained in:
commit
ce67101651
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"name": "Llama 2",
|
||||
"system_prompt": "[INST] <<SYS>>\nWrite {{char}}'s next reply in this fictional roleplay with {{user}}.\n<</SYS>>\n",
|
||||
"name": "Llama 2 Chat",
|
||||
"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] <<SYS>>\n",
|
||||
"system_sequence": "[INST] <<SYS>>\n{{sys}}\n<</SYS>>\n",
|
||||
"stop_sequence": "",
|
||||
"separator_sequence": "\n",
|
||||
"wrap": false,
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "OpenOrca/OpenChat",
|
||||
"name": "OpenOrca-OpenChat",
|
||||
"system_prompt": "You are a helpful assistant. Please answer truthfully and write out your thinking step by step to be sure you get the right answer. If you make a mistake or encounter an error in your thinking, say so out loud and attempt to correct it. If you don't know or aren't sure about something, say so clearly. You will act as a professional logician, mathematician, and physicist. You will also act as the most appropriate type of expert to answer any particular question or solve the relevant problem; state which expert type your are, if so. Also think of any particular named expert that would be ideal to answer the relevant question or solve the relevant problem; name and act as them, if appropriate.\n",
|
||||
"input_sequence": "User: ",
|
||||
"output_sequence": "<|end_of_turn|>\nAssistant: ",
|
||||
|
|
|
@ -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);
|
||||
} else {
|
||||
return power_user.instruct.system_sequence + separator + systemPrompt;
|
||||
}
|
||||
}
|
||||
|
||||
return systemPrompt;
|
||||
|
|
Loading…
Reference in New Issue