diff --git a/default/content/index.json b/default/content/index.json index d7345c84e..fd66ea8d9 100644 --- a/default/content/index.json +++ b/default/content/index.json @@ -355,5 +355,149 @@ { "filename": "presets/openai/Default.json", "type": "openai_preset" + }, + { + "filename": "presets/context/Adventure.json", + "type": "context" + }, + { + "filename": "presets/context/Alpaca-Roleplay.json", + "type": "context" + }, + { + "filename": "presets/context/Alpaca-Single-Turn.json", + "type": "context" + }, + { + "filename": "presets/context/ChatML.json", + "type": "context" + }, + { + "filename": "presets/context/Default.json", + "type": "context" + }, + { + "filename": "presets/context/DreamGen Role-Play V1.json", + "type": "context" + }, + { + "filename": "presets/context/Libra-32B.json", + "type": "context" + }, + { + "filename": "presets/context/Lightning 1.1.json", + "type": "context" + }, + { + "filename": "presets/context/Minimalist.json", + "type": "context" + }, + { + "filename": "presets/context/Mistral.json", + "type": "context" + }, + { + "filename": "presets/context/NovelAI.json", + "type": "context" + }, + { + "filename": "presets/context/OldDefault.json", + "type": "context" + }, + { + "filename": "presets/context/Pygmalion.json", + "type": "context" + }, + { + "filename": "presets/context/Story.json", + "type": "context" + }, + { + "filename": "presets/context/simple-proxy-for-tavern.json", + "type": "context" + }, + { + "filename": "presets/instruct/Adventure.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Alpaca-Roleplay.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Alpaca-Single-Turn.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Alpaca.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/ChatML.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/DreamGen Role-Play V1.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Koala.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Libra-32B.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Lightning 1.1.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Llama 2 Chat.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Metharme.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Mistral.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/OpenOrca-OpenChat.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Pygmalion.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Story.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Synthia.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Vicuna 1.0.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/Vicuna 1.1.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/WizardLM-13B.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/WizardLM.json", + "type": "instruct" + }, + { + "filename": "presets/instruct/simple-proxy-for-tavern.json", + "type": "instruct" } ] diff --git a/public/context/Adventure.json b/public/context/Adventure.json deleted file mode 100644 index 3318d518f..000000000 --- a/public/context/Adventure.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", - "example_separator": "", - "chat_start": "", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": false, - "trim_sentences": false, - "include_newline": false, - "single_line": true, - "name": "Adventure" -} \ No newline at end of file diff --git a/public/context/Alpaca-Roleplay.json b/public/context/Alpaca-Roleplay.json deleted file mode 100644 index d564a1dd7..000000000 --- a/public/context/Alpaca-Roleplay.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.\n\n{{#if system}}{{system}}\n\n{{/if}}### Input:\n{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", - "example_separator": "### New Roleplay:", - "chat_start": "### New Roleplay:", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "Alpaca-Roleplay" -} \ No newline at end of file diff --git a/public/context/Alpaca-Single-Turn.json b/public/context/Alpaca-Single-Turn.json deleted file mode 100644 index ea58fe9d5..000000000 --- a/public/context/Alpaca-Single-Turn.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", - "example_separator": "", - "chat_start": "", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": false, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "Alpaca-Single-Turn" -} \ No newline at end of file diff --git a/public/context/ChatML.json b/public/context/ChatML.json deleted file mode 100644 index 8515598f3..000000000 --- a/public/context/ChatML.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", - "example_separator": "", - "chat_start": "", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "ChatML" -} \ No newline at end of file diff --git a/public/context/Default.json b/public/context/Default.json deleted file mode 100644 index 7c8a231cf..000000000 --- a/public/context/Default.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", - "example_separator": "***", - "chat_start": "***", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "Default" -} \ No newline at end of file diff --git a/public/context/DreamGen Role-Play V1.json b/public/context/DreamGen Role-Play V1.json deleted file mode 100644 index 6698d27fa..000000000 --- a/public/context/DreamGen Role-Play V1.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "<|im_start|>system\n{{#if system}}{{system}}\n\n\n{{/if}}## Overall plot description:\n\n{{#if scenario}}{{scenario}}{{else}}Conversation between {{char}} and {{user}}.{{/if}}{{#if wiBefore}}\n\n{{wiBefore}}{{/if}}\n\n\n## Characters:\n\n### {{char}}\n\n{{#if description}}{{description}}\n\n{{/if}}{{#if personality}}{{personality}}\n\n{{/if}}### {{user}}\n\n{{#if persona}}{{persona}}{{else}}{{user}} is the protagonist of the role-play.{{/if}}{{#if wiAfter}}\n\n{{wiAfter}}{{/if}}{{#if mesExamples}}\n\n{{mesExamples}}{{/if}}", - "example_separator": "", - "chat_start": "", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": false, - "trim_sentences": true, - "include_newline": false, - "single_line": false, - "name": "DreamGen Role-Play V1" -} \ No newline at end of file diff --git a/public/context/Libra-32B.json b/public/context/Libra-32B.json deleted file mode 100644 index b5dee2872..000000000 --- a/public/context/Libra-32B.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "### Instruction:\nWrite {{char}}'s next reply in this roleplay with {{user}}. Use the provided character sheet and example dialogue for formatting direction and character speech patterns.\n\n{{#if system}}{{system}}\n\n{{/if}}### Character Sheet:\n{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", - "example_separator": "### Example:", - "chat_start": "### START ROLEPLAY:", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "Libra-32B" -} \ No newline at end of file diff --git a/public/context/Lightning 1.1.json b/public/context/Lightning 1.1.json deleted file mode 100644 index 3b0190c92..000000000 --- a/public/context/Lightning 1.1.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "{{system}}\n{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{char}}'s description:{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality:{{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{user}}'s persona: {{persona}}\n{{/if}}", - "example_separator": "Example of an interaction:", - "chat_start": "This is the history of the roleplay:", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "Lightning 1.1" -} \ No newline at end of file diff --git a/public/context/Minimalist.json b/public/context/Minimalist.json deleted file mode 100644 index cc7550c51..000000000 --- a/public/context/Minimalist.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", - "example_separator": "", - "chat_start": "", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "Minimalist" -} \ No newline at end of file diff --git a/public/context/Mistral.json b/public/context/Mistral.json deleted file mode 100644 index d8c437e0e..000000000 --- a/public/context/Mistral.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "[INST] {{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}[/INST]", - "example_separator": "Examples:", - "chat_start": "", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "Mistral" -} \ No newline at end of file diff --git a/public/context/NovelAI.json b/public/context/NovelAI.json deleted file mode 100644 index 1a7887a90..000000000 --- a/public/context/NovelAI.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "{{#if system}}{{system}}{{/if}}\n{{#if wiBefore}}{{wiBefore}}{{/if}}\n{{#if persona}}{{persona}}{{/if}}\n{{#if description}}{{description}}{{/if}}\n{{#if personality}}Personality: {{personality}}{{/if}}\n{{#if scenario}}Scenario: {{scenario}}{{/if}}\n{{#if wiAfter}}{{wiAfter}}{{/if}}", - "example_separator": "***", - "chat_start": "***", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "NovelAI" -} \ No newline at end of file diff --git a/public/context/OldDefault.json b/public/context/OldDefault.json deleted file mode 100644 index 542971f21..000000000 --- a/public/context/OldDefault.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Circumstances and context of the dialogue: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", - "example_separator": "This is how {{char}} should talk", - "chat_start": "\nThen the roleplay chat between {{user}} and {{char}} begins.\n", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "OldDefault" -} \ No newline at end of file diff --git a/public/context/Pygmalion.json b/public/context/Pygmalion.json deleted file mode 100644 index 68de8c1d0..000000000 --- a/public/context/Pygmalion.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", - "example_separator": "", - "chat_start": "", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "Pygmalion" -} \ No newline at end of file diff --git a/public/context/Story.json b/public/context/Story.json deleted file mode 100644 index 26f70937b..000000000 --- a/public/context/Story.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{personality}}\n{{/if}}{{#if scenario}}{{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", - "example_separator": "", - "chat_start": "", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "Story" -} \ No newline at end of file diff --git a/public/context/simple-proxy-for-tavern.json b/public/context/simple-proxy-for-tavern.json deleted file mode 100644 index 38003c68d..000000000 --- a/public/context/simple-proxy-for-tavern.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "story_string": "## {{char}}\n- You're \"{{char}}\" in this never-ending roleplay with \"{{user}}\".\n### Input:\n{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}### Response:\n(OOC) Understood. I will take this info into account for the roleplay. (end OOC)", - "example_separator": "### New Roleplay:", - "chat_start": "### New Roleplay:", - "use_stop_strings": false, - "allow_jailbreak": false, - "always_force_name2": true, - "trim_sentences": false, - "include_newline": false, - "single_line": false, - "name": "simple-proxy-for-tavern" -} \ No newline at end of file diff --git a/src/endpoints/content-manager.js b/src/endpoints/content-manager.js index e40c8ff85..16460bf16 100644 --- a/src/endpoints/content-manager.js +++ b/src/endpoints/content-manager.js @@ -159,6 +159,10 @@ function getTargetByType(type) { return DIRECTORIES.novelAI_Settings; case 'textgen_preset': return DIRECTORIES.textGen_Settings; + case 'instruct': + return DIRECTORIES.instruct; + case 'context': + return DIRECTORIES.context; default: return null; }