diff --git a/.dockerignore b/.dockerignore index 9e0a20629..7008980d7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,3 +13,4 @@ access.log /cache .DS_Store /public/scripts/extensions/third-party +/colab diff --git a/.github/readme.md b/.github/readme.md index fc8cef288..dd68b3b31 100644 --- a/.github/readme.md +++ b/.github/readme.md @@ -350,6 +350,7 @@ Start.bat --port 8000 --listen false | Option | Description | Type | |-------------------------|----------------------------------------------------------------------|----------| | `--version` | Show version number | boolean | +| `--configPath` | Override the path to the config.yaml file | string | | `--dataRoot` | Root directory for data storage | string | | `--port` | Sets the port under which SillyTavern will run | number | | `--listen` | SillyTavern will listen on all network interfaces | boolean | diff --git a/.github/workflows/pr-auto-manager.yml b/.github/workflows/pr-auto-manager.yml index d713df8b7..0da34a6e2 100644 --- a/.github/workflows/pr-auto-manager.yml +++ b/.github/workflows/pr-auto-manager.yml @@ -30,7 +30,8 @@ jobs: # https://github.com/marketplace/actions/checkout uses: actions/checkout@v4.2.2 with: - ref: ${{ github.head_ref }} + ref: ${{ github.event.pull_request.head.sha }} + repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Setup Node.js # Setup Node.js environment @@ -49,7 +50,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} eslint-args: '--ignore-path=.gitignore --quiet' - extensions: 'js,ts' + extensions: 'js' annotations: true ignore-patterns: | dist/ diff --git a/.npmignore b/.npmignore index 0c99b6680..7b9e61859 100644 --- a/.npmignore +++ b/.npmignore @@ -12,3 +12,4 @@ access.log .vscode .git /public/scripts/extensions/third-party +/colab diff --git a/Dockerfile b/Dockerfile index a133d0a47..4a90d5c90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,15 +12,13 @@ WORKDIR ${APP_HOME} # Set NODE_ENV to production ENV NODE_ENV=production -# Install app dependencies -COPY package*.json post-install.js ./ +# Bundle app source +COPY . ./ + RUN \ echo "*** Install npm packages ***" && \ npm i --no-audit --no-fund --loglevel=error --no-progress --omit=dev && npm cache clean --force -# Bundle app source -COPY . ./ - # Copy default chats, characters and user avatars to .default folder RUN \ rm -f "config.yaml" || true && \ diff --git a/default/config.yaml b/default/config.yaml index cad7ce072..e7fe7e196 100644 --- a/default/config.yaml +++ b/default/config.yaml @@ -155,6 +155,7 @@ whitelistImportDomains: - cdn.discordapp.com - files.catbox.moe - raw.githubusercontent.com + - char-archive.evulid.cc # API request overrides (for KoboldAI and Text Completion APIs) ## Note: host includes the port number if it's not the default (80 or 443) ## Format is an array of objects: @@ -233,6 +234,10 @@ claude: # should be ideal for most use cases. # Any value other than a non-negative integer will be ignored and caching at depth will not be enabled. cachingAtDepth: -1 +# -- GOOGLE GEMINI API CONFIGURATION -- +gemini: + # API endpoint version ("v1beta" or "v1alpha") + apiVersion: 'v1beta' # -- SERVER PLUGIN CONFIGURATION -- enableServerPlugins: false # Attempt to automatically update server plugins on startup diff --git a/default/content/index.json b/default/content/index.json index 49e2dd12c..c74592051 100644 --- a/default/content/index.json +++ b/default/content/index.json @@ -540,7 +540,7 @@ "type": "context" }, { - "filename": "presets/context/Pygmalion.json", + "filename": "presets/context/Metharme.json", "type": "context" }, { @@ -563,6 +563,10 @@ "filename": "presets/context/Llama 3 Instruct.json", "type": "context" }, + { + "filename": "presets/context/Llama 4 Instruct.json", + "type": "context" + }, { "filename": "presets/context/Phi.json", "type": "context" @@ -615,10 +619,6 @@ "filename": "presets/instruct/OpenOrca-OpenChat.json", "type": "instruct" }, - { - "filename": "presets/instruct/Pygmalion.json", - "type": "instruct" - }, { "filename": "presets/instruct/Story.json", "type": "instruct" @@ -663,6 +663,10 @@ "filename": "presets/instruct/Llama 3 Instruct.json", "type": "instruct" }, + { + "filename": "presets/instruct/Llama 4 Instruct.json", + "type": "instruct" + }, { "filename": "presets/instruct/Phi.json", "type": "instruct" @@ -747,6 +751,10 @@ "filename": "presets/sysprompt/Neutral - Chat.json", "type": "sysprompt" }, + { + "filename": "presets/sysprompt/Lightning 1.1.json", + "type": "sysprompt" + }, { "filename": "presets/instruct/Mistral V1.json", "type": "instruct" @@ -787,6 +795,14 @@ "filename": "presets/context/DeepSeek-V2.5.json", "type": "context" }, + { + "filename": "presets/instruct/GLM-4.json", + "type": "instruct" + }, + { + "filename": "presets/context/GLM-4.json", + "type": "context" + }, { "filename": "presets/reasoning/DeepSeek.json", "type": "reasoning" diff --git a/default/content/presets/context/Adventure.json b/default/content/presets/context/Adventure.json index 03ad99837..9f4f9d858 100644 --- a/default/content/presets/context/Adventure.json +++ b/default/content/presets/context/Adventure.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": false, "trim_sentences": false, "single_line": true, diff --git a/default/content/presets/context/Alpaca-Single-Turn.json b/default/content/presets/context/Alpaca-Single-Turn.json index ea0b08816..496ac8322 100644 --- a/default/content/presets/context/Alpaca-Single-Turn.json +++ b/default/content/presets/context/Alpaca-Single-Turn.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": false, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Alpaca.json b/default/content/presets/context/Alpaca.json index 0432976f1..bc3ad8fd7 100644 --- a/default/content/presets/context/Alpaca.json +++ b/default/content/presets/context/Alpaca.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/ChatML-Names.json b/default/content/presets/context/ChatML-Names.json index 8aa30b516..82719085b 100644 --- a/default/content/presets/context/ChatML-Names.json +++ b/default/content/presets/context/ChatML-Names.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/ChatML.json b/default/content/presets/context/ChatML.json index 4b8610b7a..118c8d234 100644 --- a/default/content/presets/context/ChatML.json +++ b/default/content/presets/context/ChatML.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Command R.json b/default/content/presets/context/Command R.json index 01410e517..28d0cc8b1 100644 --- a/default/content/presets/context/Command R.json +++ b/default/content/presets/context/Command R.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>New Roleplay:<|END_OF_TURN_TOKEN|>", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/DeepSeek-V2.5.json b/default/content/presets/context/DeepSeek-V2.5.json index 49efaba59..9a00bab27 100644 --- a/default/content/presets/context/DeepSeek-V2.5.json +++ b/default/content/presets/context/DeepSeek-V2.5.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Default.json b/default/content/presets/context/Default.json index de84def35..817dd60fa 100644 --- a/default/content/presets/context/Default.json +++ b/default/content/presets/context/Default.json @@ -3,7 +3,6 @@ "example_separator": "***", "chat_start": "***", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/DreamGen Role-Play V1 ChatML.json b/default/content/presets/context/DreamGen Role-Play V1 ChatML.json index 6b2d8bc61..c16cab917 100644 --- a/default/content/presets/context/DreamGen Role-Play V1 ChatML.json +++ b/default/content/presets/context/DreamGen Role-Play V1 ChatML.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": false, "trim_sentences": true, "single_line": false, diff --git a/default/content/presets/context/DreamGen Role-Play V1 Llama3.json b/default/content/presets/context/DreamGen Role-Play V1 Llama3.json index aa51e64f8..22991883b 100644 --- a/default/content/presets/context/DreamGen Role-Play V1 Llama3.json +++ b/default/content/presets/context/DreamGen Role-Play V1 Llama3.json @@ -3,7 +3,6 @@ "example_separator": "<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nWrite an example narrative / conversation that is not part of the main story.", "chat_start": "<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nStart the role-play between {{char}} and {{user}}.", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": false, "trim_sentences": true, "single_line": false, diff --git a/default/content/presets/context/GLM-4.json b/default/content/presets/context/GLM-4.json new file mode 100644 index 000000000..e9dfb2776 --- /dev/null +++ b/default/content/presets/context/GLM-4.json @@ -0,0 +1,10 @@ +{ + "story_string": "[gMASK]{{#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}}{{trim}}\n", + "example_separator": "", + "chat_start": "", + "use_stop_strings": false, + "always_force_name2": true, + "trim_sentences": false, + "single_line": false, + "name": "GLM-4" +} diff --git a/default/content/presets/context/Gemma 2.json b/default/content/presets/context/Gemma 2.json index 768346957..1b3dd4ddc 100644 --- a/default/content/presets/context/Gemma 2.json +++ b/default/content/presets/context/Gemma 2.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Libra-32B.json b/default/content/presets/context/Libra-32B.json index 974391be6..370f4a0e8 100644 --- a/default/content/presets/context/Libra-32B.json +++ b/default/content/presets/context/Libra-32B.json @@ -3,7 +3,6 @@ "example_separator": "### Example:", "chat_start": "### START ROLEPLAY:", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Lightning 1.1.json b/default/content/presets/context/Lightning 1.1.json index 24878e009..0551ed136 100644 --- a/default/content/presets/context/Lightning 1.1.json +++ b/default/content/presets/context/Lightning 1.1.json @@ -1,9 +1,8 @@ { - "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:", + "story_string": "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{{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}}\n\n", + "example_separator": "Example of an interaction:\n", + "chat_start": "This is the history of the roleplay:\n", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Llama 2 Chat.json b/default/content/presets/context/Llama 2 Chat.json index d0cd16ca0..a5623791c 100644 --- a/default/content/presets/context/Llama 2 Chat.json +++ b/default/content/presets/context/Llama 2 Chat.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Llama 3 Instruct.json b/default/content/presets/context/Llama 3 Instruct.json index cbc155504..9808b0a75 100644 --- a/default/content/presets/context/Llama 3 Instruct.json +++ b/default/content/presets/context/Llama 3 Instruct.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Llama 4 Instruct.json b/default/content/presets/context/Llama 4 Instruct.json new file mode 100644 index 000000000..9d145295e --- /dev/null +++ b/default/content/presets/context/Llama 4 Instruct.json @@ -0,0 +1,10 @@ +{ + "story_string": "<|begin_of_text|><|header_start|>system<|header_end|>\n\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}}{{trim}}<|eot|>", + "example_separator": "", + "chat_start": "", + "use_stop_strings": false, + "always_force_name2": true, + "trim_sentences": false, + "single_line": false, + "name": "Llama 4 Instruct" +} diff --git a/default/content/presets/context/Llama-3-Instruct-Names.json b/default/content/presets/context/Llama-3-Instruct-Names.json index a1815e02c..74e9bee89 100644 --- a/default/content/presets/context/Llama-3-Instruct-Names.json +++ b/default/content/presets/context/Llama-3-Instruct-Names.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Pygmalion.json b/default/content/presets/context/Metharme.json similarity index 90% rename from default/content/presets/context/Pygmalion.json rename to default/content/presets/context/Metharme.json index eab73535c..f27b140bf 100644 --- a/default/content/presets/context/Pygmalion.json +++ b/default/content/presets/context/Metharme.json @@ -3,9 +3,8 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, - "name": "Pygmalion" + "name": "Metharme" } diff --git a/default/content/presets/context/Minimalist.json b/default/content/presets/context/Minimalist.json index 107da83b3..cfcf3fddd 100644 --- a/default/content/presets/context/Minimalist.json +++ b/default/content/presets/context/Minimalist.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Mistral V1.json b/default/content/presets/context/Mistral V1.json index 93d037941..5a806b518 100644 --- a/default/content/presets/context/Mistral V1.json +++ b/default/content/presets/context/Mistral V1.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Mistral V2 & V3.json b/default/content/presets/context/Mistral V2 & V3.json index bc41b01a1..460e05665 100644 --- a/default/content/presets/context/Mistral V2 & V3.json +++ b/default/content/presets/context/Mistral V2 & V3.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Mistral V3-Tekken.json b/default/content/presets/context/Mistral V3-Tekken.json index e5b211606..554cbe94a 100644 --- a/default/content/presets/context/Mistral V3-Tekken.json +++ b/default/content/presets/context/Mistral V3-Tekken.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Mistral V7.json b/default/content/presets/context/Mistral V7.json index 519d5d152..e469af131 100644 --- a/default/content/presets/context/Mistral V7.json +++ b/default/content/presets/context/Mistral V7.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/NovelAI.json b/default/content/presets/context/NovelAI.json index 8914a953d..a72053301 100644 --- a/default/content/presets/context/NovelAI.json +++ b/default/content/presets/context/NovelAI.json @@ -3,7 +3,6 @@ "example_separator": "***", "chat_start": "***", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/OldDefault.json b/default/content/presets/context/OldDefault.json index 81dd70911..3c9a43b8a 100644 --- a/default/content/presets/context/OldDefault.json +++ b/default/content/presets/context/OldDefault.json @@ -3,7 +3,6 @@ "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, "single_line": false, diff --git a/default/content/presets/context/Phi.json b/default/content/presets/context/Phi.json index 79a27ada9..b67893891 100644 --- a/default/content/presets/context/Phi.json +++ b/default/content/presets/context/Phi.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Story.json b/default/content/presets/context/Story.json index 525a06dc0..63d190bf1 100644 --- a/default/content/presets/context/Story.json +++ b/default/content/presets/context/Story.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Synthia.json b/default/content/presets/context/Synthia.json index 1fb639c0b..e8939343a 100644 --- a/default/content/presets/context/Synthia.json +++ b/default/content/presets/context/Synthia.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/Tulu.json b/default/content/presets/context/Tulu.json index af3c1f9cf..b5f64664e 100644 --- a/default/content/presets/context/Tulu.json +++ b/default/content/presets/context/Tulu.json @@ -3,7 +3,6 @@ "example_separator": "", "chat_start": "", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/context/simple-proxy-for-tavern.json b/default/content/presets/context/simple-proxy-for-tavern.json index 0346c2f32..d5597c520 100644 --- a/default/content/presets/context/simple-proxy-for-tavern.json +++ b/default/content/presets/context/simple-proxy-for-tavern.json @@ -3,7 +3,6 @@ "example_separator": "### New Roleplay:", "chat_start": "### New Roleplay:", "use_stop_strings": false, - "allow_jailbreak": false, "always_force_name2": true, "trim_sentences": false, "single_line": false, diff --git a/default/content/presets/instruct/ChatML.json b/default/content/presets/instruct/ChatML.json index 199b3915b..ee543433a 100644 --- a/default/content/presets/instruct/ChatML.json +++ b/default/content/presets/instruct/ChatML.json @@ -6,7 +6,7 @@ "stop_sequence": "<|im_end|>", "wrap": true, "macro": true, - "names_behavior": "always", + "names_behavior": "force", "activation_regex": "", "system_sequence_prefix": "", "system_sequence_suffix": "", diff --git a/default/content/presets/instruct/Command R.json b/default/content/presets/instruct/Command R.json index f34159081..762c0df8d 100644 --- a/default/content/presets/instruct/Command R.json +++ b/default/content/presets/instruct/Command R.json @@ -8,7 +8,7 @@ "stop_sequence": "<|END_OF_TURN_TOKEN|>", "wrap": false, "macro": true, - "names_behavior": "always", + "names_behavior": "force", "activation_regex": "", "skip_examples": false, "output_suffix": "<|END_OF_TURN_TOKEN|>", diff --git a/default/content/presets/instruct/Pygmalion.json b/default/content/presets/instruct/GLM-4.json similarity index 66% rename from default/content/presets/instruct/Pygmalion.json rename to default/content/presets/instruct/GLM-4.json index 3827585bf..8fb081365 100644 --- a/default/content/presets/instruct/Pygmalion.json +++ b/default/content/presets/instruct/GLM-4.json @@ -1,22 +1,22 @@ { - "input_sequence": "<|user|>", - "output_sequence": "<|model|>", + "input_sequence": "<|user|>\n", + "output_sequence": "<|assistant|>\n", + "first_output_sequence": "", "last_output_sequence": "", - "system_sequence": "", - "stop_sequence": "<|user|>", + "system_sequence_prefix": "<|system|>\n", + "system_sequence_suffix": "", + "stop_sequence": "", "wrap": false, "macro": true, - "names_behavior": "always", + "names_behavior": "force", "activation_regex": "", - "system_sequence_prefix": "<|system|>", - "system_sequence_suffix": "", - "first_output_sequence": "", "skip_examples": false, "output_suffix": "", "input_suffix": "", + "system_sequence": "", "system_suffix": "", "user_alignment_message": "", - "system_same_as_user": true, "last_system_sequence": "", - "name": "Pygmalion" + "system_same_as_user": true, + "name": "GLM-4" } diff --git a/default/content/presets/instruct/Gemma 2.json b/default/content/presets/instruct/Gemma 2.json index 7a21a2316..d5585a2c8 100644 --- a/default/content/presets/instruct/Gemma 2.json +++ b/default/content/presets/instruct/Gemma 2.json @@ -6,7 +6,7 @@ "stop_sequence": "", "wrap": true, "macro": true, - "names_behavior": "none", + "names_behavior": "force", "activation_regex": "", "system_sequence_prefix": "", "system_sequence_suffix": "", diff --git a/default/content/presets/instruct/Lightning 1.1.json b/default/content/presets/instruct/Lightning 1.1.json index 3ce4d6a90..6f1439629 100644 --- a/default/content/presets/instruct/Lightning 1.1.json +++ b/default/content/presets/instruct/Lightning 1.1.json @@ -1,7 +1,7 @@ { "input_sequence": "### Instruction:", - "output_sequence": "### Response: (length = unlimited)", - "last_output_sequence": "", + "output_sequence": "### Response:", + "last_output_sequence": "### Response: (length = unlimited)", "system_sequence": "", "stop_sequence": "", "wrap": true, @@ -12,8 +12,8 @@ "system_sequence_suffix": "", "first_output_sequence": "", "skip_examples": false, - "output_suffix": "", - "input_suffix": "", + "output_suffix": "\n\n", + "input_suffix": "\n\n", "system_suffix": "", "user_alignment_message": "", "system_same_as_user": true, diff --git a/default/content/presets/instruct/Llama 3 Instruct.json b/default/content/presets/instruct/Llama 3 Instruct.json index d283820f4..8bc2e0ace 100644 --- a/default/content/presets/instruct/Llama 3 Instruct.json +++ b/default/content/presets/instruct/Llama 3 Instruct.json @@ -6,7 +6,7 @@ "stop_sequence": "<|eot_id|>", "wrap": false, "macro": true, - "names_behavior": "always", + "names_behavior": "force", "activation_regex": "", "system_sequence_prefix": "", "system_sequence_suffix": "", @@ -16,7 +16,7 @@ "input_suffix": "<|eot_id|>", "system_suffix": "<|eot_id|>", "user_alignment_message": "", - "system_same_as_user": true, + "system_same_as_user": false, "last_system_sequence": "", "name": "Llama 3 Instruct" } diff --git a/default/content/presets/instruct/Llama 4 Instruct.json b/default/content/presets/instruct/Llama 4 Instruct.json new file mode 100644 index 000000000..13c712af2 --- /dev/null +++ b/default/content/presets/instruct/Llama 4 Instruct.json @@ -0,0 +1,22 @@ +{ + "input_sequence": "<|header_start|>user<|header_end|>\n\n", + "output_sequence": "<|header_start|>assistant<|header_end|>\n\n", + "last_output_sequence": "", + "system_sequence": "<|header_start|>system<|header_end|>\n\n", + "stop_sequence": "<|eot|>", + "wrap": false, + "macro": true, + "names_behavior": "force", + "activation_regex": "", + "system_sequence_prefix": "", + "system_sequence_suffix": "", + "first_output_sequence": "", + "skip_examples": false, + "output_suffix": "<|eot|>", + "input_suffix": "<|eot|>", + "system_suffix": "<|eot|>", + "user_alignment_message": "", + "system_same_as_user": false, + "last_system_sequence": "", + "name": "Llama 4 Instruct" +} diff --git a/default/content/presets/instruct/Mistral V1.json b/default/content/presets/instruct/Mistral V1.json index c47dbdc77..679ae01db 100644 --- a/default/content/presets/instruct/Mistral V1.json +++ b/default/content/presets/instruct/Mistral V1.json @@ -6,7 +6,7 @@ "stop_sequence": "", "wrap": false, "macro": true, - "names_behavior": "always", + "names_behavior": "force", "activation_regex": "", "system_sequence_prefix": "", "system_sequence_suffix": "", diff --git a/default/content/presets/instruct/Mistral V2 & V3.json b/default/content/presets/instruct/Mistral V2 & V3.json index 7619a1aa5..da072c92b 100644 --- a/default/content/presets/instruct/Mistral V2 & V3.json +++ b/default/content/presets/instruct/Mistral V2 & V3.json @@ -6,7 +6,7 @@ "stop_sequence": "", "wrap": false, "macro": true, - "names_behavior": "always", + "names_behavior": "force", "activation_regex": "", "system_sequence_prefix": "", "system_sequence_suffix": "", diff --git a/default/content/presets/instruct/Mistral V3-Tekken.json b/default/content/presets/instruct/Mistral V3-Tekken.json index 217007d73..ee0207748 100644 --- a/default/content/presets/instruct/Mistral V3-Tekken.json +++ b/default/content/presets/instruct/Mistral V3-Tekken.json @@ -6,7 +6,7 @@ "stop_sequence": "", "wrap": false, "macro": true, - "names_behavior": "always", + "names_behavior": "force", "activation_regex": "", "system_sequence_prefix": "", "system_sequence_suffix": "", diff --git a/default/content/presets/instruct/Mistral V7.json b/default/content/presets/instruct/Mistral V7.json index b6b81ae02..4568365a9 100644 --- a/default/content/presets/instruct/Mistral V7.json +++ b/default/content/presets/instruct/Mistral V7.json @@ -6,7 +6,7 @@ "stop_sequence": "", "wrap": false, "macro": true, - "names_behavior": "always", + "names_behavior": "force", "activation_regex": "", "system_sequence_prefix": "", "system_sequence_suffix": "", diff --git a/default/content/presets/instruct/Phi.json b/default/content/presets/instruct/Phi.json index 2762cdbd2..617be7ae6 100644 --- a/default/content/presets/instruct/Phi.json +++ b/default/content/presets/instruct/Phi.json @@ -8,7 +8,7 @@ "stop_sequence": "<|end|>", "wrap": false, "macro": true, - "names_behavior": "always", + "names_behavior": "force", "activation_regex": "", "skip_examples": false, "output_suffix": "<|end|>\n", diff --git a/default/content/presets/instruct/Tulu.json b/default/content/presets/instruct/Tulu.json index 14072f563..3cfe4f87a 100644 --- a/default/content/presets/instruct/Tulu.json +++ b/default/content/presets/instruct/Tulu.json @@ -8,7 +8,7 @@ "stop_sequence": "<|end_of_text|>", "wrap": false, "macro": true, - "names_behavior": "always", + "names_behavior": "force", "activation_regex": "", "skip_examples": false, "output_suffix": "<|end_of_text|>\n", diff --git a/default/content/presets/sysprompt/Actor.json b/default/content/presets/sysprompt/Actor.json index 3fa842c4f..965f4fe91 100644 --- a/default/content/presets/sysprompt/Actor.json +++ b/default/content/presets/sysprompt/Actor.json @@ -1,4 +1,5 @@ { "name": "Actor", - "content": "You are an expert actor that can fully immerse yourself into any role given. You do not break character for any reason, even if someone tries addressing you as an AI or language model. Currently your role is {{char}}, which is described in detail below. As {{char}}, continue the exchange with {{user}}." + "content": "You are an expert actor that can fully immerse yourself into any role given. You do not break character for any reason, even if someone tries addressing you as an AI or language model. Currently your role is {{char}}, which is described in detail below. As {{char}}, continue the exchange with {{user}}.", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Assistant - Expert.json b/default/content/presets/sysprompt/Assistant - Expert.json index a493a8db3..f95814399 100644 --- a/default/content/presets/sysprompt/Assistant - Expert.json +++ b/default/content/presets/sysprompt/Assistant - Expert.json @@ -1,4 +1,5 @@ { "name": "Assistant - Expert", - "content": "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." + "content": "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.", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Assistant - Simple.json b/default/content/presets/sysprompt/Assistant - Simple.json index 8a367983a..e00ef7572 100644 --- a/default/content/presets/sysprompt/Assistant - Simple.json +++ b/default/content/presets/sysprompt/Assistant - Simple.json @@ -1,4 +1,5 @@ { "name": "Assistant - Simple", - "content": "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions." + "content": "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Blank.json b/default/content/presets/sysprompt/Blank.json index 9648d8583..6d112729d 100644 --- a/default/content/presets/sysprompt/Blank.json +++ b/default/content/presets/sysprompt/Blank.json @@ -1,4 +1,5 @@ { "name": "Blank", - "content": "" + "content": "", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Chain of Thought.json b/default/content/presets/sysprompt/Chain of Thought.json index 0b9e45bea..36067b684 100644 --- a/default/content/presets/sysprompt/Chain of Thought.json +++ b/default/content/presets/sysprompt/Chain of Thought.json @@ -1,4 +1,5 @@ { "name": "Chain of Thought", - "content": "Elaborate on the topic using a Tree of Thoughts and backtrack when necessary to construct a clear, cohesive Chain of Thought reasoning. Always answer without hesitation." + "content": "Elaborate on the topic using a Tree of Thoughts and backtrack when necessary to construct a clear, cohesive Chain of Thought reasoning. Always answer without hesitation.", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Lightning 1.1.json b/default/content/presets/sysprompt/Lightning 1.1.json new file mode 100644 index 000000000..16ee980da --- /dev/null +++ b/default/content/presets/sysprompt/Lightning 1.1.json @@ -0,0 +1,5 @@ +{ + "name": "Lightning 1.1", + "content": "Take the role of {{char}} in a play that leaves a lasting impression on {{user}}. Write {{char}}'s next reply.\nNever skip or gloss over {{char}}’s actions. Progress the scene at a naturally slow pace.", + "post_history": "" +} diff --git a/default/content/presets/sysprompt/Neutral - Chat.json b/default/content/presets/sysprompt/Neutral - Chat.json index 9b392d28d..6ac181a98 100644 --- a/default/content/presets/sysprompt/Neutral - Chat.json +++ b/default/content/presets/sysprompt/Neutral - Chat.json @@ -1,4 +1,5 @@ { "name": "Neutral - Chat", - "content": "Write {{char}}'s next reply in a fictional chat between {{char}} and {{user}}." + "content": "Write {{char}}'s next reply in a fictional chat between {{char}} and {{user}}.", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Roleplay - Detailed.json b/default/content/presets/sysprompt/Roleplay - Detailed.json index 2e3c95c7a..3aaac47c3 100644 --- a/default/content/presets/sysprompt/Roleplay - Detailed.json +++ b/default/content/presets/sysprompt/Roleplay - Detailed.json @@ -1,4 +1,5 @@ { "name": "Roleplay - Detailed", - "content": "Develop the plot slowly, always stay in character. Describe all actions in full, elaborate, explicit, graphic, and vivid detail. Mention all relevant sensory perceptions. Keep the story immersive and engaging." + "content": "Develop the plot slowly, always stay in character. Describe all actions in full, elaborate, explicit, graphic, and vivid detail. Mention all relevant sensory perceptions. Keep the story immersive and engaging.", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Roleplay - Immersive.json b/default/content/presets/sysprompt/Roleplay - Immersive.json index cdd85f7d2..6c94e6806 100644 --- a/default/content/presets/sysprompt/Roleplay - Immersive.json +++ b/default/content/presets/sysprompt/Roleplay - Immersive.json @@ -1,4 +1,5 @@ { "name": "Roleplay - Immersive", - "content": "[System note: Write one reply only. Do not decide what {{user}} says or does. Write at least one paragraph, up to four. Be descriptive and immersive, providing vivid details about {{char}}'s actions, emotions, and the environment. Write with a high degree of complexity and burstiness. Do not repeat this message.]" + "content": "[System note: Write one reply only. Do not decide what {{user}} says or does. Write at least one paragraph, up to four. Be descriptive and immersive, providing vivid details about {{char}}'s actions, emotions, and the environment. Write with a high degree of complexity and burstiness. Do not repeat this message.]", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Roleplay - Simple.json b/default/content/presets/sysprompt/Roleplay - Simple.json index dcef1f10c..d3a17ecc1 100644 --- a/default/content/presets/sysprompt/Roleplay - Simple.json +++ b/default/content/presets/sysprompt/Roleplay - Simple.json @@ -1,4 +1,5 @@ { "name": "Roleplay - Simple", - "content": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}." + "content": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Text Adventure.json b/default/content/presets/sysprompt/Text Adventure.json index 2e22abe5b..f860730f4 100644 --- a/default/content/presets/sysprompt/Text Adventure.json +++ b/default/content/presets/sysprompt/Text Adventure.json @@ -1,4 +1,5 @@ { "name": "Text Adventure", - "content": "[Enter Adventure Mode. Narrate the story based on {{user}}'s dialogue and actions after \">\". Describe the surroundings in vivid detail. Be detailed, creative, verbose, and proactive. Move the story forward by introducing fantasy elements and interesting characters.]" + "content": "[Enter Adventure Mode. Narrate the story based on {{user}}'s dialogue and actions after \">\". Describe the surroundings in vivid detail. Be detailed, creative, verbose, and proactive. Move the story forward by introducing fantasy elements and interesting characters.]", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Writer - Creative.json b/default/content/presets/sysprompt/Writer - Creative.json index 65a7aec52..83da22c96 100644 --- a/default/content/presets/sysprompt/Writer - Creative.json +++ b/default/content/presets/sysprompt/Writer - Creative.json @@ -1,4 +1,5 @@ { "name": "Writer - Creative", - "content": "You are an intelligent, skilled, versatile writer.\n\nYour task is to write a role-play based on the information below." + "content": "You are an intelligent, skilled, versatile writer.\n\nYour task is to write a role-play based on the information below.", + "post_history": "" } diff --git a/default/content/presets/sysprompt/Writer - Realistic.json b/default/content/presets/sysprompt/Writer - Realistic.json index a5abcbfb5..16aa33ba4 100644 --- a/default/content/presets/sysprompt/Writer - Realistic.json +++ b/default/content/presets/sysprompt/Writer - Realistic.json @@ -1,4 +1,5 @@ { "name": "Writer - Realistic", - "content": "Continue writing this story and portray characters realistically." + "content": "Continue writing this story and portray characters realistically.", + "post_history": "" } diff --git a/package-lock.json b/package-lock.json index b3fed7535..159558e74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sillytavern", - "version": "1.12.13", + "version": "1.12.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sillytavern", - "version": "1.12.13", + "version": "1.12.14", "hasInstallScript": true, "license": "AGPL-3.0", "dependencies": { diff --git a/package.json b/package.json index 7d1adae9a..0733f177d 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "type": "git", "url": "https://github.com/SillyTavern/SillyTavern.git" }, - "version": "1.12.13", + "version": "1.12.14", "scripts": { "start": "node server.js", "debug": "node --inspect server.js", diff --git a/post-install.js b/post-install.js index ae01b7d1a..4908e950e 100644 --- a/post-install.js +++ b/post-install.js @@ -3,133 +3,17 @@ */ import fs from 'node:fs'; import path from 'node:path'; -import crypto from 'node:crypto'; import process from 'node:process'; import yaml from 'yaml'; -import _ from 'lodash'; import chalk from 'chalk'; import { createRequire } from 'node:module'; +import { addMissingConfigValues } from './src/config-init.js'; /** * Colorizes console output. */ const color = chalk; -const keyMigrationMap = [ - { - oldKey: 'disableThumbnails', - newKey: 'thumbnails.enabled', - migrate: (value) => !value, - }, - { - oldKey: 'thumbnailsQuality', - newKey: 'thumbnails.quality', - migrate: (value) => value, - }, - { - oldKey: 'avatarThumbnailsPng', - newKey: 'thumbnails.format', - migrate: (value) => (value ? 'png' : 'jpg'), - }, - { - oldKey: 'disableChatBackup', - newKey: 'backups.chat.enabled', - migrate: (value) => !value, - }, - { - oldKey: 'numberOfBackups', - newKey: 'backups.common.numberOfBackups', - migrate: (value) => value, - }, - { - oldKey: 'maxTotalChatBackups', - newKey: 'backups.chat.maxTotalBackups', - migrate: (value) => value, - }, - { - oldKey: 'chatBackupThrottleInterval', - newKey: 'backups.chat.throttleInterval', - migrate: (value) => value, - }, - { - oldKey: 'enableExtensions', - newKey: 'extensions.enabled', - migrate: (value) => value, - }, - { - oldKey: 'enableExtensionsAutoUpdate', - newKey: 'extensions.autoUpdate', - migrate: (value) => value, - }, - { - oldKey: 'extras.disableAutoDownload', - newKey: 'extensions.models.autoDownload', - migrate: (value) => !value, - }, - { - oldKey: 'extras.classificationModel', - newKey: 'extensions.models.classification', - migrate: (value) => value, - }, - { - oldKey: 'extras.captioningModel', - newKey: 'extensions.models.captioning', - migrate: (value) => value, - }, - { - oldKey: 'extras.embeddingModel', - newKey: 'extensions.models.embedding', - migrate: (value) => value, - }, - { - oldKey: 'extras.speechToTextModel', - newKey: 'extensions.models.speechToText', - migrate: (value) => value, - }, - { - oldKey: 'extras.textToSpeechModel', - newKey: 'extensions.models.textToSpeech', - migrate: (value) => value, - }, - { - oldKey: 'minLogLevel', - newKey: 'logging.minLogLevel', - migrate: (value) => value, - }, - { - oldKey: 'cardsCacheCapacity', - newKey: 'performance.memoryCacheCapacity', - migrate: (value) => `${value}mb`, - }, - { - oldKey: 'cookieSecret', - newKey: 'cookieSecret', - migrate: () => void 0, - remove: true, - }, -]; - -/** - * Gets all keys from an object recursively. - * @param {object} obj Object to get all keys from - * @param {string} prefix Prefix to prepend to all keys - * @returns {string[]} Array of all keys in the object - */ -function getAllKeys(obj, prefix = '') { - if (typeof obj !== 'object' || Array.isArray(obj) || obj === null) { - return []; - } - - return _.flatMap(Object.keys(obj), key => { - const newPrefix = prefix ? `${prefix}.${key}` : key; - if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) { - return getAllKeys(obj[key], newPrefix); - } else { - return [newPrefix]; - } - }); -} - /** * Converts the old config.conf file to the new config.yaml format. */ @@ -156,71 +40,6 @@ function convertConfig() { } } -/** - * Compares the current config.yaml with the default config.yaml and adds any missing values. - */ -function addMissingConfigValues() { - try { - const defaultConfig = yaml.parse(fs.readFileSync(path.join(process.cwd(), './default/config.yaml'), 'utf8')); - let config = yaml.parse(fs.readFileSync(path.join(process.cwd(), './config.yaml'), 'utf8')); - - // Migrate old keys to new keys - const migratedKeys = []; - for (const { oldKey, newKey, migrate, remove } of keyMigrationMap) { - if (_.has(config, oldKey)) { - if (remove) { - _.unset(config, oldKey); - migratedKeys.push({ - oldKey, - newValue: void 0, - }); - continue; - } - - const oldValue = _.get(config, oldKey); - const newValue = migrate(oldValue); - _.set(config, newKey, newValue); - _.unset(config, oldKey); - - migratedKeys.push({ - oldKey, - newKey, - oldValue, - newValue, - }); - } - } - - // Get all keys from the original config - const originalKeys = getAllKeys(config); - - // Use lodash's defaultsDeep function to recursively apply default properties - config = _.defaultsDeep(config, defaultConfig); - - // Get all keys from the updated config - const updatedKeys = getAllKeys(config); - - // Find the keys that were added - const addedKeys = _.difference(updatedKeys, originalKeys); - - if (addedKeys.length === 0 && migratedKeys.length === 0) { - return; - } - - if (addedKeys.length > 0) { - console.log('Adding missing config values to config.yaml:', addedKeys); - } - - if (migratedKeys.length > 0) { - console.log('Migrating config values in config.yaml:', migratedKeys); - } - - fs.writeFileSync('./config.yaml', yaml.stringify(config)); - } catch (error) { - console.error(color.red('FATAL: Could not add missing config values to config.yaml'), error); - } -} - /** * Creates the default config files if they don't exist yet. */ @@ -283,58 +102,13 @@ function createDefaultFiles() { } } -/** - * Returns the MD5 hash of the given data. - * @param {Buffer} data Input data - * @returns {string} MD5 hash of the input data - */ -function getMd5Hash(data) { - return crypto - .createHash('md5') - .update(new Uint8Array(data)) - .digest('hex'); -} - -/** - * Copies the WASM binaries from the sillytavern-transformers package to the dist folder. - */ -function copyWasmFiles() { - if (!fs.existsSync('./dist')) { - fs.mkdirSync('./dist'); - } - - const listDir = fs.readdirSync('./node_modules/sillytavern-transformers/dist'); - - for (const file of listDir) { - if (file.endsWith('.wasm')) { - const sourcePath = `./node_modules/sillytavern-transformers/dist/${file}`; - const targetPath = `./dist/${file}`; - - // Don't copy if the file already exists and is the same checksum - if (fs.existsSync(targetPath)) { - const sourceChecksum = getMd5Hash(fs.readFileSync(sourcePath)); - const targetChecksum = getMd5Hash(fs.readFileSync(targetPath)); - - if (sourceChecksum === targetChecksum) { - continue; - } - } - - fs.copyFileSync(sourcePath, targetPath); - console.log(`${file} successfully copied to ./dist/${file}`); - } - } -} - try { // 0. Convert config.conf to config.yaml convertConfig(); // 1. Create default config files createDefaultFiles(); - // 2. Copy transformers WASM binaries from node_modules - copyWasmFiles(); - // 3. Add missing config values - addMissingConfigValues(); + // 2. Add missing config values + addMissingConfigValues(path.join(process.cwd(), './config.yaml')); } catch (error) { console.error(error); } diff --git a/public/css/rm-groups.css b/public/css/rm-groups.css index 499f59873..6e12164b2 100644 --- a/public/css/rm-groups.css +++ b/public/css/rm-groups.css @@ -87,7 +87,7 @@ } #rm_group_members:empty::before { - content: 'Group is empty'; + content: attr(group_empty_text); font-weight: bolder; width: 100%; @@ -115,7 +115,7 @@ } #rm_group_add_members:empty::before { - content: 'No characters available'; + content: attr(no_characters_text); font-weight: bolder; width: 100%; diff --git a/public/css/world-info.css b/public/css/world-info.css index e7e03ad41..f8130d51f 100644 --- a/public/css/world-info.css +++ b/public/css/world-info.css @@ -124,6 +124,10 @@ cursor: initial; } +.world_entry .inline-drawer-header-pointer { + cursor: pointer; +} + .world_entry .killSwitch { cursor: pointer; } diff --git a/public/img/xai.svg b/public/img/xai.svg new file mode 100644 index 000000000..80d6367f4 --- /dev/null +++ b/public/img/xai.svg @@ -0,0 +1,46 @@ + + + + diff --git a/public/index.html b/public/index.html index 5305da0b2..3235598ee 100644 --- a/public/index.html +++ b/public/index.html @@ -646,7 +646,7 @@ -
+
Multiple swipes per generation
@@ -685,7 +685,7 @@
-
+
Temperature
@@ -698,7 +698,7 @@
-
+
Frequency Penalty
@@ -711,7 +711,7 @@
-
+
Presence Penalty
@@ -737,7 +737,7 @@
-
+
Top P
@@ -974,7 +974,7 @@
-
+
Seed
@@ -1419,7 +1419,7 @@
- -
+
-
+
-
+
@@ -2031,7 +2034,7 @@
-
+
-
-
+
+
@@ -2491,8 +2498,8 @@ - - + +
@@ -2615,8 +2622,8 @@
@@ -2756,9 +2763,10 @@ + -
+
Reverse Proxy
@@ -2821,7 +2829,7 @@
-
+
@@ -2880,12 +2888,17 @@ - - - - + - + + + + + + + + + @@ -2894,9 +2907,15 @@ + + + + + + @@ -3127,48 +3146,49 @@

Google Model

@@ -3424,6 +3444,31 @@
+
+

+ + xAI API Key + +

+
+ + +
+
+ For privacy reasons, your API key will be hidden after you reload the page. +
+

xAI Model

+ +

Prompt Post-Processing

- Allow Post-History Instructions -
@@ -3783,9 +3823,7 @@
-
- - +
@@ -3807,10 +3845,14 @@
-
-
-   +
+ + +
@@ -5113,7 +5155,7 @@
- +
@@ -5489,7 +5531,7 @@
-
+
@@ -5507,7 +5549,7 @@
-
+
@@ -5766,7 +5808,7 @@ @ Depth - +

Role @@ -5927,7 +5969,7 @@
-
 entries
+
 entries

@@ -5987,11 +6029,11 @@
- +
- +
@@ -6247,6 +6289,54 @@
+
+
+ Additional Matching Sources +
+
+
+ + + + + + + + + + +
+
@@ -6353,7 +6443,7 @@ Depth
Injection depth. 0 = after the last message, 1 = before the last message, etc.
- +
@@ -6614,7 +6704,7 @@
- Go back + Go back
@@ -6713,7 +6803,7 @@