Merge branch 'staging' into ffmpeg-videobg

This commit is contained in:
Cohee
2025-05-04 22:05:15 +03:00
167 changed files with 3251 additions and 1779 deletions

View File

@@ -13,3 +13,4 @@ access.log
/cache /cache
.DS_Store .DS_Store
/public/scripts/extensions/third-party /public/scripts/extensions/third-party
/colab

1
.github/readme.md vendored
View File

@@ -350,6 +350,7 @@ Start.bat --port 8000 --listen false
| Option | Description | Type | | Option | Description | Type |
|-------------------------|----------------------------------------------------------------------|----------| |-------------------------|----------------------------------------------------------------------|----------|
| `--version` | Show version number | boolean | | `--version` | Show version number | boolean |
| `--configPath` | Override the path to the config.yaml file | string |
| `--dataRoot` | Root directory for data storage | string | | `--dataRoot` | Root directory for data storage | string |
| `--port` | Sets the port under which SillyTavern will run | number | | `--port` | Sets the port under which SillyTavern will run | number |
| `--listen` | SillyTavern will listen on all network interfaces | boolean | | `--listen` | SillyTavern will listen on all network interfaces | boolean |

View File

@@ -30,7 +30,8 @@ jobs:
# https://github.com/marketplace/actions/checkout # https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2 uses: actions/checkout@v4.2.2
with: 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 - name: Setup Node.js
# Setup Node.js environment # Setup Node.js environment
@@ -49,7 +50,7 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
eslint-args: '--ignore-path=.gitignore --quiet' eslint-args: '--ignore-path=.gitignore --quiet'
extensions: 'js,ts' extensions: 'js'
annotations: true annotations: true
ignore-patterns: | ignore-patterns: |
dist/ dist/

View File

@@ -12,3 +12,4 @@ access.log
.vscode .vscode
.git .git
/public/scripts/extensions/third-party /public/scripts/extensions/third-party
/colab

View File

@@ -12,15 +12,13 @@ WORKDIR ${APP_HOME}
# Set NODE_ENV to production # Set NODE_ENV to production
ENV NODE_ENV=production ENV NODE_ENV=production
# Install app dependencies # Bundle app source
COPY package*.json post-install.js ./ COPY . ./
RUN \ RUN \
echo "*** Install npm packages ***" && \ echo "*** Install npm packages ***" && \
npm i --no-audit --no-fund --loglevel=error --no-progress --omit=dev && npm cache clean --force 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 <folder>.default folder # Copy default chats, characters and user avatars to <folder>.default folder
RUN \ RUN \
rm -f "config.yaml" || true && \ rm -f "config.yaml" || true && \

View File

@@ -155,6 +155,7 @@ whitelistImportDomains:
- cdn.discordapp.com - cdn.discordapp.com
- files.catbox.moe - files.catbox.moe
- raw.githubusercontent.com - raw.githubusercontent.com
- char-archive.evulid.cc
# API request overrides (for KoboldAI and Text Completion APIs) # API request overrides (for KoboldAI and Text Completion APIs)
## Note: host includes the port number if it's not the default (80 or 443) ## Note: host includes the port number if it's not the default (80 or 443)
## Format is an array of objects: ## Format is an array of objects:
@@ -233,6 +234,10 @@ claude:
# should be ideal for most use cases. # 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. # Any value other than a non-negative integer will be ignored and caching at depth will not be enabled.
cachingAtDepth: -1 cachingAtDepth: -1
# -- GOOGLE GEMINI API CONFIGURATION --
gemini:
# API endpoint version ("v1beta" or "v1alpha")
apiVersion: 'v1beta'
# -- SERVER PLUGIN CONFIGURATION -- # -- SERVER PLUGIN CONFIGURATION --
enableServerPlugins: false enableServerPlugins: false
# Attempt to automatically update server plugins on startup # Attempt to automatically update server plugins on startup

View File

@@ -540,7 +540,7 @@
"type": "context" "type": "context"
}, },
{ {
"filename": "presets/context/Pygmalion.json", "filename": "presets/context/Metharme.json",
"type": "context" "type": "context"
}, },
{ {
@@ -563,6 +563,10 @@
"filename": "presets/context/Llama 3 Instruct.json", "filename": "presets/context/Llama 3 Instruct.json",
"type": "context" "type": "context"
}, },
{
"filename": "presets/context/Llama 4 Instruct.json",
"type": "context"
},
{ {
"filename": "presets/context/Phi.json", "filename": "presets/context/Phi.json",
"type": "context" "type": "context"
@@ -615,10 +619,6 @@
"filename": "presets/instruct/OpenOrca-OpenChat.json", "filename": "presets/instruct/OpenOrca-OpenChat.json",
"type": "instruct" "type": "instruct"
}, },
{
"filename": "presets/instruct/Pygmalion.json",
"type": "instruct"
},
{ {
"filename": "presets/instruct/Story.json", "filename": "presets/instruct/Story.json",
"type": "instruct" "type": "instruct"
@@ -663,6 +663,10 @@
"filename": "presets/instruct/Llama 3 Instruct.json", "filename": "presets/instruct/Llama 3 Instruct.json",
"type": "instruct" "type": "instruct"
}, },
{
"filename": "presets/instruct/Llama 4 Instruct.json",
"type": "instruct"
},
{ {
"filename": "presets/instruct/Phi.json", "filename": "presets/instruct/Phi.json",
"type": "instruct" "type": "instruct"
@@ -747,6 +751,10 @@
"filename": "presets/sysprompt/Neutral - Chat.json", "filename": "presets/sysprompt/Neutral - Chat.json",
"type": "sysprompt" "type": "sysprompt"
}, },
{
"filename": "presets/sysprompt/Lightning 1.1.json",
"type": "sysprompt"
},
{ {
"filename": "presets/instruct/Mistral V1.json", "filename": "presets/instruct/Mistral V1.json",
"type": "instruct" "type": "instruct"
@@ -787,6 +795,14 @@
"filename": "presets/context/DeepSeek-V2.5.json", "filename": "presets/context/DeepSeek-V2.5.json",
"type": "context" "type": "context"
}, },
{
"filename": "presets/instruct/GLM-4.json",
"type": "instruct"
},
{
"filename": "presets/context/GLM-4.json",
"type": "context"
},
{ {
"filename": "presets/reasoning/DeepSeek.json", "filename": "presets/reasoning/DeepSeek.json",
"type": "reasoning" "type": "reasoning"

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": false, "always_force_name2": false,
"trim_sentences": false, "trim_sentences": false,
"single_line": true, "single_line": true,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": false, "always_force_name2": false,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>New Roleplay:<|END_OF_TURN_TOKEN|>", "chat_start": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>New Roleplay:<|END_OF_TURN_TOKEN|>",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "***", "example_separator": "***",
"chat_start": "***", "chat_start": "***",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": false, "always_force_name2": false,
"trim_sentences": true, "trim_sentences": true,
"single_line": false, "single_line": false,

View File

@@ -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.", "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}}.", "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, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": false, "always_force_name2": false,
"trim_sentences": true, "trim_sentences": true,
"single_line": false, "single_line": false,

View File

@@ -0,0 +1,10 @@
{
"story_string": "[gMASK]<sop>{{#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"
}

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "### Example:", "example_separator": "### Example:",
"chat_start": "### START ROLEPLAY:", "chat_start": "### START ROLEPLAY:",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -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}}", "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:", "example_separator": "Example of an interaction:\n",
"chat_start": "This is the history of the roleplay:", "chat_start": "This is the history of the roleplay:\n",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -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"
}

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,9 +3,8 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,
"name": "Pygmalion" "name": "Metharme"
} }

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "***", "example_separator": "***",
"chat_start": "***", "chat_start": "***",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "This is how {{char}} should talk", "example_separator": "This is how {{char}} should talk",
"chat_start": "\nThen the roleplay chat between {{user}} and {{char}} begins.\n", "chat_start": "\nThen the roleplay chat between {{user}} and {{char}} begins.\n",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "", "example_separator": "",
"chat_start": "", "chat_start": "",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -3,7 +3,6 @@
"example_separator": "### New Roleplay:", "example_separator": "### New Roleplay:",
"chat_start": "### New Roleplay:", "chat_start": "### New Roleplay:",
"use_stop_strings": false, "use_stop_strings": false,
"allow_jailbreak": false,
"always_force_name2": true, "always_force_name2": true,
"trim_sentences": false, "trim_sentences": false,
"single_line": false, "single_line": false,

View File

@@ -6,7 +6,7 @@
"stop_sequence": "<|im_end|>", "stop_sequence": "<|im_end|>",
"wrap": true, "wrap": true,
"macro": true, "macro": true,
"names_behavior": "always", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"system_sequence_prefix": "", "system_sequence_prefix": "",
"system_sequence_suffix": "", "system_sequence_suffix": "",

View File

@@ -8,7 +8,7 @@
"stop_sequence": "<|END_OF_TURN_TOKEN|>", "stop_sequence": "<|END_OF_TURN_TOKEN|>",
"wrap": false, "wrap": false,
"macro": true, "macro": true,
"names_behavior": "always", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"skip_examples": false, "skip_examples": false,
"output_suffix": "<|END_OF_TURN_TOKEN|>", "output_suffix": "<|END_OF_TURN_TOKEN|>",

View File

@@ -1,22 +1,22 @@
{ {
"input_sequence": "<|user|>", "input_sequence": "<|user|>\n",
"output_sequence": "<|model|>", "output_sequence": "<|assistant|>\n",
"first_output_sequence": "",
"last_output_sequence": "", "last_output_sequence": "",
"system_sequence": "", "system_sequence_prefix": "<|system|>\n",
"stop_sequence": "<|user|>", "system_sequence_suffix": "",
"stop_sequence": "",
"wrap": false, "wrap": false,
"macro": true, "macro": true,
"names_behavior": "always", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"system_sequence_prefix": "<|system|>",
"system_sequence_suffix": "",
"first_output_sequence": "",
"skip_examples": false, "skip_examples": false,
"output_suffix": "", "output_suffix": "",
"input_suffix": "", "input_suffix": "",
"system_sequence": "",
"system_suffix": "", "system_suffix": "",
"user_alignment_message": "", "user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "", "last_system_sequence": "",
"name": "Pygmalion" "system_same_as_user": true,
"name": "GLM-4"
} }

View File

@@ -6,7 +6,7 @@
"stop_sequence": "<end_of_turn>", "stop_sequence": "<end_of_turn>",
"wrap": true, "wrap": true,
"macro": true, "macro": true,
"names_behavior": "none", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"system_sequence_prefix": "", "system_sequence_prefix": "",
"system_sequence_suffix": "", "system_sequence_suffix": "",

View File

@@ -1,7 +1,7 @@
{ {
"input_sequence": "### Instruction:", "input_sequence": "### Instruction:",
"output_sequence": "### Response: (length = unlimited)", "output_sequence": "### Response:",
"last_output_sequence": "", "last_output_sequence": "### Response: (length = unlimited)",
"system_sequence": "", "system_sequence": "",
"stop_sequence": "", "stop_sequence": "",
"wrap": true, "wrap": true,
@@ -12,8 +12,8 @@
"system_sequence_suffix": "", "system_sequence_suffix": "",
"first_output_sequence": "", "first_output_sequence": "",
"skip_examples": false, "skip_examples": false,
"output_suffix": "", "output_suffix": "\n\n",
"input_suffix": "", "input_suffix": "\n\n",
"system_suffix": "", "system_suffix": "",
"user_alignment_message": "", "user_alignment_message": "",
"system_same_as_user": true, "system_same_as_user": true,

View File

@@ -6,7 +6,7 @@
"stop_sequence": "<|eot_id|>", "stop_sequence": "<|eot_id|>",
"wrap": false, "wrap": false,
"macro": true, "macro": true,
"names_behavior": "always", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"system_sequence_prefix": "", "system_sequence_prefix": "",
"system_sequence_suffix": "", "system_sequence_suffix": "",
@@ -16,7 +16,7 @@
"input_suffix": "<|eot_id|>", "input_suffix": "<|eot_id|>",
"system_suffix": "<|eot_id|>", "system_suffix": "<|eot_id|>",
"user_alignment_message": "", "user_alignment_message": "",
"system_same_as_user": true, "system_same_as_user": false,
"last_system_sequence": "", "last_system_sequence": "",
"name": "Llama 3 Instruct" "name": "Llama 3 Instruct"
} }

View File

@@ -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"
}

View File

@@ -6,7 +6,7 @@
"stop_sequence": "", "stop_sequence": "",
"wrap": false, "wrap": false,
"macro": true, "macro": true,
"names_behavior": "always", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"system_sequence_prefix": "", "system_sequence_prefix": "",
"system_sequence_suffix": "", "system_sequence_suffix": "",

View File

@@ -6,7 +6,7 @@
"stop_sequence": "", "stop_sequence": "",
"wrap": false, "wrap": false,
"macro": true, "macro": true,
"names_behavior": "always", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"system_sequence_prefix": "", "system_sequence_prefix": "",
"system_sequence_suffix": "", "system_sequence_suffix": "",

View File

@@ -6,7 +6,7 @@
"stop_sequence": "", "stop_sequence": "",
"wrap": false, "wrap": false,
"macro": true, "macro": true,
"names_behavior": "always", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"system_sequence_prefix": "", "system_sequence_prefix": "",
"system_sequence_suffix": "", "system_sequence_suffix": "",

View File

@@ -6,7 +6,7 @@
"stop_sequence": "</s>", "stop_sequence": "</s>",
"wrap": false, "wrap": false,
"macro": true, "macro": true,
"names_behavior": "always", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"system_sequence_prefix": "", "system_sequence_prefix": "",
"system_sequence_suffix": "", "system_sequence_suffix": "",

View File

@@ -8,7 +8,7 @@
"stop_sequence": "<|end|>", "stop_sequence": "<|end|>",
"wrap": false, "wrap": false,
"macro": true, "macro": true,
"names_behavior": "always", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"skip_examples": false, "skip_examples": false,
"output_suffix": "<|end|>\n", "output_suffix": "<|end|>\n",

View File

@@ -8,7 +8,7 @@
"stop_sequence": "<|end_of_text|>", "stop_sequence": "<|end_of_text|>",
"wrap": false, "wrap": false,
"macro": true, "macro": true,
"names_behavior": "always", "names_behavior": "force",
"activation_regex": "", "activation_regex": "",
"skip_examples": false, "skip_examples": false,
"output_suffix": "<|end_of_text|>\n", "output_suffix": "<|end_of_text|>\n",

View File

@@ -1,4 +1,5 @@
{ {
"name": "Actor", "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": ""
} }

View File

@@ -1,4 +1,5 @@
{ {
"name": "Assistant - Expert", "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": ""
} }

View File

@@ -1,4 +1,5 @@
{ {
"name": "Assistant - Simple", "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": ""
} }

View File

@@ -1,4 +1,5 @@
{ {
"name": "Blank", "name": "Blank",
"content": "" "content": "",
"post_history": ""
} }

View File

@@ -1,4 +1,5 @@
{ {
"name": "Chain of Thought", "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": ""
} }

View File

@@ -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": ""
}

View File

@@ -1,4 +1,5 @@
{ {
"name": "Neutral - Chat", "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": ""
} }

View File

@@ -1,4 +1,5 @@
{ {
"name": "Roleplay - Detailed", "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": ""
} }

View File

@@ -1,4 +1,5 @@
{ {
"name": "Roleplay - Immersive", "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": ""
} }

View File

@@ -1,4 +1,5 @@
{ {
"name": "Roleplay - Simple", "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": ""
} }

View File

@@ -1,4 +1,5 @@
{ {
"name": "Text Adventure", "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": ""
} }

View File

@@ -1,4 +1,5 @@
{ {
"name": "Writer - Creative", "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": ""
} }

View File

@@ -1,4 +1,5 @@
{ {
"name": "Writer - Realistic", "name": "Writer - Realistic",
"content": "Continue writing this story and portray characters realistically." "content": "Continue writing this story and portray characters realistically.",
"post_history": ""
} }

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "sillytavern", "name": "sillytavern",
"version": "1.12.13", "version": "1.12.14",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "sillytavern", "name": "sillytavern",
"version": "1.12.13", "version": "1.12.14",
"hasInstallScript": true, "hasInstallScript": true,
"license": "AGPL-3.0", "license": "AGPL-3.0",
"dependencies": { "dependencies": {

View File

@@ -109,7 +109,7 @@
"type": "git", "type": "git",
"url": "https://github.com/SillyTavern/SillyTavern.git" "url": "https://github.com/SillyTavern/SillyTavern.git"
}, },
"version": "1.12.13", "version": "1.12.14",
"scripts": { "scripts": {
"start": "node server.js", "start": "node server.js",
"debug": "node --inspect server.js", "debug": "node --inspect server.js",

View File

@@ -3,133 +3,17 @@
*/ */
import fs from 'node:fs'; import fs from 'node:fs';
import path from 'node:path'; import path from 'node:path';
import crypto from 'node:crypto';
import process from 'node:process'; import process from 'node:process';
import yaml from 'yaml'; import yaml from 'yaml';
import _ from 'lodash';
import chalk from 'chalk'; import chalk from 'chalk';
import { createRequire } from 'node:module'; import { createRequire } from 'node:module';
import { addMissingConfigValues } from './src/config-init.js';
/** /**
* Colorizes console output. * Colorizes console output.
*/ */
const color = chalk; 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. * 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. * 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 { try {
// 0. Convert config.conf to config.yaml // 0. Convert config.conf to config.yaml
convertConfig(); convertConfig();
// 1. Create default config files // 1. Create default config files
createDefaultFiles(); createDefaultFiles();
// 2. Copy transformers WASM binaries from node_modules // 2. Add missing config values
copyWasmFiles(); addMissingConfigValues(path.join(process.cwd(), './config.yaml'));
// 3. Add missing config values
addMissingConfigValues();
} catch (error) { } catch (error) {
console.error(error); console.error(error);
} }

View File

@@ -87,7 +87,7 @@
} }
#rm_group_members:empty::before { #rm_group_members:empty::before {
content: 'Group is empty'; content: attr(group_empty_text);
font-weight: bolder; font-weight: bolder;
width: 100%; width: 100%;
@@ -115,7 +115,7 @@
} }
#rm_group_add_members:empty::before { #rm_group_add_members:empty::before {
content: 'No characters available'; content: attr(no_characters_text);
font-weight: bolder; font-weight: bolder;
width: 100%; width: 100%;

View File

@@ -124,6 +124,10 @@
cursor: initial; cursor: initial;
} }
.world_entry .inline-drawer-header-pointer {
cursor: pointer;
}
.world_entry .killSwitch { .world_entry .killSwitch {
cursor: pointer; cursor: pointer;
} }

46
public/img/xai.svg Normal file
View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 27.5.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version="1.1"
id="katman_1"
x="0px"
y="0px"
viewBox="0 0 438.67001 481.44999"
xml:space="preserve"
sodipodi:docname="XAI_Logo.svg"
width="438.67001"
height="481.45001"
inkscape:version="1.3 (0e150ed, 2023-07-21)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs4" /><sodipodi:namedview
id="namedview4"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="0.39645207"
inkscape:cx="219.44645"
inkscape:cy="238.36425"
inkscape:window-width="1512"
inkscape:window-height="856"
inkscape:window-x="0"
inkscape:window-y="38"
inkscape:window-maximized="1"
inkscape:current-layer="katman_1" />&#10;<g
id="g4"
transform="translate(-201.61,-56.91)">&#10; <polygon
points="631.96,538.36 640.28,93.18 557.09,211.99 565.4,538.36 "
id="polygon1" />&#10; <polygon
points="379.35,284.53 430.13,357.05 640.28,56.91 538.72,56.91 "
id="polygon2" />&#10; <polygon
points="353.96,465.84 303.17,393.31 201.61,538.36 303.17,538.36 "
id="polygon3" />&#10; <polygon
points="531.69,538.36 303.17,211.99 201.61,211.99 430.13,538.36 "
id="polygon4" />&#10;</g>&#10;</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -646,7 +646,7 @@
<input type="number" id="openai_max_tokens" name="openai_max_tokens" class="text_pole" min="1" max="65536"> <input type="number" id="openai_max_tokens" name="openai_max_tokens" class="text_pole" min="1" max="65536">
</div> </div>
</div> </div>
<div class="range-block" data-source="openai,custom"> <div class="range-block" data-source="openai,custom,xai">
<div class="range-block-title" data-i18n="Multiple swipes per generation"> <div class="range-block-title" data-i18n="Multiple swipes per generation">
Multiple swipes per generation Multiple swipes per generation
</div> </div>
@@ -685,7 +685,7 @@
</span> </span>
</div> </div>
</div> </div>
<div class="range-block" data-source="openai,claude,windowai,openrouter,ai21,scale,makersuite,mistralai,custom,cohere,perplexity,groq,01ai,nanogpt,deepseek"> <div class="range-block" data-source="openai,claude,windowai,openrouter,ai21,scale,makersuite,mistralai,custom,cohere,perplexity,groq,01ai,nanogpt,deepseek,xai">
<div class="range-block-title" data-i18n="Temperature"> <div class="range-block-title" data-i18n="Temperature">
Temperature Temperature
</div> </div>
@@ -698,7 +698,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="range-block" data-source="openai,openrouter,custom,cohere,perplexity,groq,mistralai,nanogpt,deepseek"> <div class="range-block" data-source="openai,openrouter,custom,cohere,perplexity,groq,mistralai,nanogpt,deepseek,xai">
<div class="range-block-title" data-i18n="Frequency Penalty"> <div class="range-block-title" data-i18n="Frequency Penalty">
Frequency Penalty Frequency Penalty
</div> </div>
@@ -711,7 +711,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="range-block" data-source="openai,openrouter,custom,cohere,perplexity,groq,mistralai,nanogpt,deepseek"> <div class="range-block" data-source="openai,openrouter,custom,cohere,perplexity,groq,mistralai,nanogpt,deepseek,xai">
<div class="range-block-title" data-i18n="Presence Penalty"> <div class="range-block-title" data-i18n="Presence Penalty">
Presence Penalty Presence Penalty
</div> </div>
@@ -737,7 +737,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="range-block" data-source="openai,claude,openrouter,ai21,scale,makersuite,mistralai,custom,cohere,perplexity,groq,01ai,nanogpt,deepseek"> <div class="range-block" data-source="openai,claude,openrouter,ai21,scale,makersuite,mistralai,custom,cohere,perplexity,groq,01ai,nanogpt,deepseek,xai">
<div class="range-block-title" data-i18n="Top P"> <div class="range-block-title" data-i18n="Top P">
Top P Top P
</div> </div>
@@ -974,7 +974,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="range-block" data-source="openai,openrouter,mistralai,custom,cohere,groq,nanogpt"> <div class="range-block" data-source="openai,openrouter,mistralai,custom,cohere,groq,nanogpt,xai">
<div class="range-block-title justifyLeft" data-i18n="Seed"> <div class="range-block-title justifyLeft" data-i18n="Seed">
Seed Seed
</div> </div>
@@ -1419,7 +1419,7 @@
</div> </div>
</div> </div>
<div data-tg-type="aphrodite, ooba, koboldcpp, tabby, llamacpp" id="dryBlock" class="wide100p"> <div data-tg-type="aphrodite, ooba, koboldcpp, tabby, llamacpp, dreamgen" id="dryBlock" class="wide100p">
<h4 class="wide100p textAlignCenter" title="DRY penalizes tokens that would extend the end of the input into a sequence that has previously occurred in the input. Set multiplier to 0 to disable." data-i18n="[title]DRY_Repetition_Penalty_desc"> <h4 class="wide100p textAlignCenter" title="DRY penalizes tokens that would extend the end of the input into a sequence that has previously occurred in the input. Set multiplier to 0 to disable." data-i18n="[title]DRY_Repetition_Penalty_desc">
<label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label> <label data-i18n="DRY Repetition Penalty">DRY Repetition Penalty</label>
<a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank"> <a href="https://github.com/oobabooga/text-generation-webui/pull/5677" target="_blank">
@@ -1574,7 +1574,7 @@
<div class="fa-solid fa-circle-info opacity50p " data-i18n="[title]Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative" title="Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative."></div> <div class="fa-solid fa-circle-info opacity50p " data-i18n="[title]Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative" title="Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative."></div>
</label> </label>
</label> </label>
<label data-tg-type="ooba, llamacpp, tabby, koboldcpp" class="checkbox_label flexGrow flexShrink" for="ban_eos_token_textgenerationwebui"> <label data-tg-type="ooba, llamacpp, tabby, koboldcpp, dreamgen" class="checkbox_label flexGrow flexShrink" for="ban_eos_token_textgenerationwebui">
<input type="checkbox" id="ban_eos_token_textgenerationwebui" /> <input type="checkbox" id="ban_eos_token_textgenerationwebui" />
<label> <label>
<small data-i18n="Ban EOS Token">Ban EOS Token</small> <small data-i18n="Ban EOS Token">Ban EOS Token</small>
@@ -1963,9 +1963,12 @@
<span data-i18n="Use search capabilities provided by the backend."> <span data-i18n="Use search capabilities provided by the backend.">
Use search capabilities provided by the backend. Use search capabilities provided by the backend.
</span> </span>
<b data-source="openrouter" data-i18n="openrouter_web_search_fee">
Not free, adds a $0.02 fee to each prompt.
</b>
</div> </div>
</div> </div>
<div class="range-block" data-source="openai,cohere,mistralai,custom,claude,openrouter,groq,deepseek,makersuite,ai21"> <div class="range-block" data-source="openai,cohere,mistralai,custom,claude,openrouter,groq,deepseek,makersuite,ai21,xai">
<label for="openai_function_calling" class="checkbox_label flexWrap widthFreeExpand"> <label for="openai_function_calling" class="checkbox_label flexWrap widthFreeExpand">
<input id="openai_function_calling" type="checkbox" /> <input id="openai_function_calling" type="checkbox" />
<span data-i18n="Enable function calling">Enable function calling</span> <span data-i18n="Enable function calling">Enable function calling</span>
@@ -1975,7 +1978,7 @@
<span data-i18n="enable_functions_desc_3">Can be utilized by various extensions to provide additional functionality.</span> <span data-i18n="enable_functions_desc_3">Can be utilized by various extensions to provide additional functionality.</span>
</div> </div>
</div> </div>
<div class="range-block" data-source="openai,openrouter,makersuite,claude,custom,01ai"> <div class="range-block" data-source="openai,openrouter,mistralai,makersuite,claude,custom,01ai,xai">
<label for="openai_image_inlining" class="checkbox_label flexWrap widthFreeExpand"> <label for="openai_image_inlining" class="checkbox_label flexWrap widthFreeExpand">
<input id="openai_image_inlining" type="checkbox" /> <input id="openai_image_inlining" type="checkbox" />
<span data-i18n="Send inline images">Send inline images</span> <span data-i18n="Send inline images">Send inline images</span>
@@ -1987,7 +1990,7 @@
<code><i class="fa-solid fa-wand-magic-sparkles"></i></code> <code><i class="fa-solid fa-wand-magic-sparkles"></i></code>
<span data-i18n="image_inlining_hint_3">menu to attach an image file to the chat.</span> <span data-i18n="image_inlining_hint_3">menu to attach an image file to the chat.</span>
</div> </div>
<div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom"> <div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom,xai">
<div class="flex-container oneline-dropdown"> <div class="flex-container oneline-dropdown">
<label for="openai_inline_image_quality" data-i18n="Inline Image Quality"> <label for="openai_inline_image_quality" data-i18n="Inline Image Quality">
Inline Image Quality Inline Image Quality
@@ -2022,7 +2025,7 @@
<input id="use_makersuite_sysprompt" type="checkbox" /> <input id="use_makersuite_sysprompt" type="checkbox" />
<span> <span>
<span data-i18n="Use system prompt">Use system prompt</span> <span data-i18n="Use system prompt">Use system prompt</span>
<i class="opacity50p fa-solid fa-circle-info" title="Gemini 1.5/2.0 Pro/Flash"></i> <i class="opacity50p fa-solid fa-circle-info" title="Gemini 1.5+, LearnLM"></i>
</span> </span>
</label> </label>
<div class="toggle-description justifyLeft marginBot5"> <div class="toggle-description justifyLeft marginBot5">
@@ -2031,7 +2034,7 @@
</span> </span>
</div> </div>
</div> </div>
<div class="range-block" data-source="deepseek,openrouter,custom,claude"> <div class="range-block" data-source="deepseek,openrouter,custom,claude,xai">
<label for="openai_show_thoughts" class="checkbox_label widthFreeExpand"> <label for="openai_show_thoughts" class="checkbox_label widthFreeExpand">
<input id="openai_show_thoughts" type="checkbox" /> <input id="openai_show_thoughts" type="checkbox" />
<span> <span>
@@ -2045,16 +2048,20 @@
</span> </span>
</div> </div>
</div> </div>
<div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom,claude"> <div class="flex-container flexFlowColumn wide100p textAlignCenter marginTop10" data-source="openai,custom,claude,xai,makersuite,openrouter">
<div class="flex-container oneline-dropdown" title="Constrains effort on reasoning for reasoning models.&#10;Currently supported values are low, medium, and high.&#10;Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response." data-i18n="[title]Constrains effort on reasoning for reasoning models."> <div class="flex-container oneline-dropdown" title="Constrains effort on reasoning for reasoning models.&#10;Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response." data-i18n="[title]Constrains effort on reasoning for reasoning models.">
<label for="openai_reasoning_effort"> <label for="openai_reasoning_effort">
<span data-i18n="Reasoning Effort">Reasoning Effort</span> <span data-i18n="Reasoning Effort">Reasoning Effort</span>
<i data-source="claude" class="opacity50p fa-solid fa-circle-info" title="Allocates a portion of the response length for thinking (low: 10%, medium: 25%, high: 50%), but minimum 1024 tokens."></i> <i data-source="openai,custom,xai,openrouter" class="opacity50p fa-solid fa-circle-info" title="OpenAI-style options: low, medium, high. Minimum and maximum are aliased to low and high. Auto does not send an effort level." data-i18n="[title]OpenAI-style options: low, medium, high. Minimum and maximum are aliased to low and high. Auto does not send an effort level."></i>
<i data-source="claude,makersuite" class="opacity50p fa-solid fa-circle-info" title="Allocates a portion of the response length for thinking (low: 10%, medium: 25%, high: 50%). Other options are model-dependent." data-i18n="[title]Allocates a portion of the response length for thinking (low: 10%, medium: 25%, high: 50%). Other options are model-dependent."></i>
</label> </label>
<select id="openai_reasoning_effort"> <select id="openai_reasoning_effort">
<option data-i18n="openai_reasoning_effort_auto" value="auto">Auto</option>
<option data-i18n="openai_reasoning_effort_minimum" value="min">Mininum</option>
<option data-i18n="openai_reasoning_effort_low" value="low">Low</option> <option data-i18n="openai_reasoning_effort_low" value="low">Low</option>
<option data-i18n="openai_reasoning_effort_medium" value="medium">Medium</option> <option data-i18n="openai_reasoning_effort_medium" value="medium">Medium</option>
<option data-i18n="openai_reasoning_effort_high" value="high">High</option> <option data-i18n="openai_reasoning_effort_high" value="high">High</option>
<option data-i18n="openai_reasoning_effort_maximum" value="max">Maximum</option>
</select> </select>
</div> </div>
</div> </div>
@@ -2491,8 +2498,8 @@
<option value="search" data-i18n="Search" hidden>A-Z</option> <option value="search" data-i18n="Search" hidden>A-Z</option>
<option value="asc">A-Z</option> <option value="asc">A-Z</option>
<option value="desc">Z-A</option> <option value="desc">Z-A</option>
<option value="date_asc">Date Asc</option> <option data-i18n="Date Asc" value="date_asc">Date Asc</option>
<option value="date_desc">Date Desc</option> <option data-i18n="Date Desc" value="date_desc">Date Desc</option>
</select> </select>
<select id="featherless_category_selection" class="text_pole"> <select id="featherless_category_selection" class="text_pole">
<option value="" disabled selected data-i18n="category">category</option> <option value="" disabled selected data-i18n="category">category</option>
@@ -2502,7 +2509,7 @@
<option value="All" data-i18n="All">All</option> <option value="All" data-i18n="All">All</option>
</select> </select>
<select id="featherless_class_selection" class="text_pole"> <select id="featherless_class_selection" class="text_pole">
<option value="" selected data-i18n="class">All Classes</option> <option value="" selected data-i18n="All Classes">All Classes</option>
</select> </select>
<div id="featherless_model_pagination_container" class="flex1"></div> <div id="featherless_model_pagination_container" class="flex1"></div>
<i id="featherless_model_grid_toggle" class="fa-solid fa-table-cells-large menu_button" data-i18n="[title]Toggle grid view" title="Toggle grid view"></i> <i id="featherless_model_grid_toggle" class="fa-solid fa-table-cells-large menu_button" data-i18n="[title]Toggle grid view" title="Toggle grid view"></i>
@@ -2615,8 +2622,8 @@
</div> </div>
<div data-tg-type="ollama"> <div data-tg-type="ollama">
<div class="flex-container flexFlowColumn"> <div class="flex-container flexFlowColumn">
<a href="https://github.com/jmorganca/ollama" target="_blank"> <a href="https://github.com/ollama/ollama" target="_blank">
jmorganca/ollama ollama/ollama
</a> </a>
</div> </div>
<div class="flex1"> <div class="flex1">
@@ -2756,9 +2763,10 @@
<option value="perplexity">Perplexity</option> <option value="perplexity">Perplexity</option>
<option value="scale">Scale</option> <option value="scale">Scale</option>
<option value="windowai">Window AI</option> <option value="windowai">Window AI</option>
<option value="xai">xAI (Grok)</option>
</optgroup> </optgroup>
</select> </select>
<div class="inline-drawer wide100p" data-source="openai,claude,mistralai,makersuite,deepseek"> <div class="inline-drawer wide100p" data-source="openai,claude,mistralai,makersuite,deepseek,xai">
<div class="inline-drawer-toggle inline-drawer-header"> <div class="inline-drawer-toggle inline-drawer-header">
<b data-i18n="Reverse Proxy">Reverse Proxy</b> <b data-i18n="Reverse Proxy">Reverse Proxy</b>
<div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div> <div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
@@ -2821,7 +2829,7 @@
</div> </div>
</div> </div>
</div> </div>
<div id="ReverseProxyWarningMessage" data-source="openai,claude,mistralai,makersuite,deepseek"> <div id="ReverseProxyWarningMessage" data-source="openai,claude,mistralai,makersuite,deepseek,xai">
<div class="reverse_proxy_warning"> <div class="reverse_proxy_warning">
<b> <b>
<div data-i18n="Using a proxy that you're not running yourself is a risk to your data privacy."> <div data-i18n="Using a proxy that you're not running yourself is a risk to your data privacy.">
@@ -2880,12 +2888,17 @@
</optgroup> </optgroup>
<optgroup label="GPT-4o mini"> <optgroup label="GPT-4o mini">
<option value="gpt-4o-mini">gpt-4o-mini</option> <option value="gpt-4o-mini">gpt-4o-mini</option>
<option value="gpt-4o-2024-11-20">gpt-4o-2024-11-20</option> <option value="gpt-4o-mini-2024-07-18">gpt-4o-mini-2024-07-18</option>
<option value="gpt-4o-2024-08-06">gpt-4o-2024-08-06</option>
<option value="gpt-4o-2024-05-13">gpt-4o-2024-05-13</option>
<option value="chatgpt-4o-latest">chatgpt-4o-latest</option>
</optgroup> </optgroup>
<optgroup label="o1 and o1-mini"> <optgroup label="GPT-4.1">
<option value="gpt-4.1">gpt-4.1</option>
<option value="gpt-4.1-2025-04-14">gpt-4.1-2025-04-14</option>
<option value="gpt-4.1-mini">gpt-4.1-mini</option>
<option value="gpt-4.1-mini-2025-04-14">gpt-4.1-mini-2025-04-14</option>
<option value="gpt-4.1-nano">gpt-4.1-nano</option>
<option value="gpt-4.1-nano-2025-04-14">gpt-4.1-nano-2025-04-14</option>
</optgroup>
<optgroup label="o1">
<option value="o1">o1</option> <option value="o1">o1</option>
<option value="o1-2024-12-17">o1-2024-12-17</option> <option value="o1-2024-12-17">o1-2024-12-17</option>
<option value="o1-mini">o1-mini</option> <option value="o1-mini">o1-mini</option>
@@ -2894,9 +2907,15 @@
<option value="o1-preview-2024-09-12">o1-preview-2024-09-12</option> <option value="o1-preview-2024-09-12">o1-preview-2024-09-12</option>
</optgroup> </optgroup>
<optgroup label="o3"> <optgroup label="o3">
<option value="o3">o3</option>
<option value="o3-2025-04-16">o3-2025-04-16</option>
<option value="o3-mini">o3-mini</option> <option value="o3-mini">o3-mini</option>
<option value="o3-mini-2025-01-31">o3-mini-2025-01-31</option> <option value="o3-mini-2025-01-31">o3-mini-2025-01-31</option>
</optgroup> </optgroup>
<optgroup label="o4">
<option value="o4-mini">o4-mini</option>
<option value="o4-mini-2025-04-16">o4-mini-2025-04-16</option>
</optgroup>
<optgroup label="GPT-4.5"> <optgroup label="GPT-4.5">
<option value="gpt-4.5-preview">gpt-4.5-preview</option> <option value="gpt-4.5-preview">gpt-4.5-preview</option>
<option value="gpt-4.5-preview-2025-02-27">gpt-4.5-preview-2025-02-27</option> <option value="gpt-4.5-preview-2025-02-27">gpt-4.5-preview-2025-02-27</option>
@@ -3127,48 +3146,49 @@
<div> <div>
<h4 data-i18n="Google Model">Google Model</h4> <h4 data-i18n="Google Model">Google Model</h4>
<select id="model_google_select"> <select id="model_google_select">
<optgroup label="Primary"> <optgroup label="Gemini 2.5">
<option value="gemini-2.0-flash">Gemini 2.0 Flash</option> <option value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option>
<option value="gemini-1.5-pro">Gemini 1.5 Pro</option> <option value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option>
<option value="gemini-1.5-flash">Gemini 1.5 Flash</option> <option value="gemini-2.5-flash-preview-04-17">gemini-2.5-flash-preview-04-17</option>
<option value="gemini-1.0-pro">Gemini 1.0 Pro (Deprecated)</option> </optgroup>
<option value="gemini-pro">Gemini Pro (1.0) (Deprecated)</option> <optgroup label="Gemini 2.0">
<option value="gemini-ultra">Gemini Ultra (1.0)</option> <option value="gemini-2.0-pro-exp-02-05">gemini-2.0-pro-exp-02-05 → 2.5-pro-exp-03-25</option>
<option value="gemini-1.0-ultra-latest">Gemini 1.0 Ultra</option> <option value="gemini-2.0-pro-exp">gemini-2.0-pro-exp → 2.5-pro-exp-03-25</option>
<option value="gemini-exp-1206">gemini-exp-1206 → 2.5-pro-exp-03-25</option>
<option value="gemini-2.0-flash-001">gemini-2.0-flash-001</option>
<option value="gemini-2.0-flash-exp-image-generation">gemini-2.0-flash-exp-image-generation</option>
<option value="gemini-2.0-flash-exp">gemini-2.0-flash-exp</option>
<option value="gemini-2.0-flash">gemini-2.0-flash</option>
<option value="gemini-2.0-flash-thinking-exp-01-21">gemini-2.0-flash-thinking-exp-01-21 → 2.5-flash-preview-04-17</option>
<option value="gemini-2.0-flash-thinking-exp-1219">gemini-2.0-flash-thinking-exp-1219 → 2.5-flash-preview-04-17</option>
<option value="gemini-2.0-flash-thinking-exp">gemini-2.0-flash-thinking-exp → 2.5-flash-preview-04-17</option>
<option value="gemini-2.0-flash-lite-001">gemini-2.0-flash-lite-001</option>
<option value="gemini-2.0-flash-lite-preview-02-05">gemini-2.0-flash-lite-preview-02-05</option>
<option value="gemini-2.0-flash-lite-preview">gemini-2.0-flash-lite-preview</option>
</optgroup>
<optgroup label="Gemini 1.5">
<option value="gemini-1.5-pro-latest">gemini-1.5-pro-latest</option>
<option value="gemini-1.5-pro-002">gemini-1.5-pro-002</option>
<option value="gemini-1.5-pro-001">gemini-1.5-pro-001</option>
<option value="gemini-1.5-pro">gemini-1.5-pro</option>
<option value="gemini-1.5-flash-latest">gemini-1.5-flash-latest</option>
<option value="gemini-1.5-flash-002">gemini-1.5-flash-002</option>
<option value="gemini-1.5-flash-001">gemini-1.5-flash-001</option>
<option value="gemini-1.5-flash">gemini-1.5-flash</option>
<option value="gemini-1.5-flash-8b-001">gemini-1.5-flash-8b-001</option>
<option value="gemini-1.5-flash-8b-exp-0924">gemini-1.5-flash-8b-exp-0924</option>
<option value="gemini-1.5-flash-8b-exp-0827">gemini-1.5-flash-8b-exp-0827</option>
<option value="gemini-1.5-flash-8b">gemini-1.5-flash-8b</option>
</optgroup> </optgroup>
<optgroup label="Gemma"> <optgroup label="Gemma">
<option value="gemma-3-27b-it">Gemma 3 27B</option> <option value="gemma-3-27b-it">gemma-3-27b-it</option>
<option value="gemma-3-12b-it">gemma-3-12b-it</option>
<option value="gemma-3-4b-it">gemma-3-4b-it</option>
<option value="gemma-3-1b-it">gemma-3-1b-it</option>
</optgroup> </optgroup>
<optgroup label="Subversions"> <optgroup label="LearnLM">
<option value="gemini-2.5-pro-preview-03-25">Gemini 2.5 Pro Preview 2025-03-25</option> <option value="learnlm-2.0-flash-experimental">learnlm-2.0-flash-experimental</option>
<option value="gemini-2.5-pro-exp-03-25">Gemini 2.5 Pro Experimental 2025-03-25</option> <option value="learnlm-1.5-pro-experimental">learnlm-1.5-pro-experimental</option>
<option value="gemini-2.0-pro-exp">Gemini 2.0 Pro Experimental</option>
<option value="gemini-2.0-pro-exp-02-05">Gemini 2.0 Pro Experimental 2025-02-05</option>
<option value="gemini-2.0-flash-lite-preview">Gemini 2.0 Flash-Lite Preview</option>
<option value="gemini-2.0-flash-lite-preview-02-05">Gemini 2.0 Flash-Lite Preview 2025-02-05</option>
<option value="gemini-2.0-flash-001">Gemini 2.0 Flash [001]</option>
<option value="gemini-2.0-flash-thinking-exp">Gemini 2.0 Flash Thinking Experimental</option>
<option value="gemini-2.0-flash-thinking-exp-01-21">Gemini 2.0 Flash Thinking Experimental 2025-01-21</option>
<option value="gemini-2.0-flash-thinking-exp-1219">Gemini 2.0 Flash Thinking Experimental 2024-12-19</option>
<option value="gemini-2.0-flash-exp">Gemini 2.0 Flash Experimental</option>
<option value="gemini-2.0-flash-exp-image-generation">Gemini 2.0 Flash (Image Generation) Experimental</option>
<option value="gemini-exp-1114">Gemini Experimental 2024-11-14</option>
<option value="gemini-exp-1121">Gemini Experimental 2024-11-21</option>
<option value="gemini-exp-1206">Gemini Experimental 2024-12-06</option>
<option value="gemini-1.5-pro-exp-0801">Gemini 1.5 Pro Experimental 2024-08-01</option>
<option value="gemini-1.5-pro-exp-0827">Gemini 1.5 Pro Experimental 2024-08-27</option>
<option value="gemini-1.5-pro-latest">Gemini 1.5 Pro [latest]</option>
<option value="gemini-1.5-pro-001">Gemini 1.5 Pro [001]</option>
<option value="gemini-1.5-pro-002">Gemini 1.5 Pro [002]</option>
<option value="gemini-1.5-flash-8b">Gemini 1.5 Flash 8B</option>
<option value="gemini-1.5-flash-exp-0827">Gemini 1.5 Flash Experimental 2024-08-27</option>
<option value="gemini-1.5-flash-8b-exp-0827">Gemini 1.5 Flash 8B Experimental 2024-08-27</option>
<option value="gemini-1.5-flash-8b-exp-0924">Gemini 1.5 Flash 8B Experimental 2024-09-24</option>
<option value="gemini-1.5-flash-latest">Gemini 1.5 Flash [latest]</option>
<option value="gemini-1.5-flash-001">Gemini 1.5 Flash [001]</option>
<option value="gemini-1.5-flash-002">Gemini 1.5 Flash [002]</option>
<option value="gemini-1.0-pro-latest">Gemini 1.0 Pro [latest] (Deprecated)</option>
<option value="gemini-1.0-pro-001">Gemini 1.0 Pro (Tuning) [001] (Deprecated)</option>
</optgroup> </optgroup>
</select> </select>
</div> </div>
@@ -3424,6 +3444,31 @@
<select id="model_01ai_select"> <select id="model_01ai_select">
</select> </select>
</div> </div>
<div id="xai_form" data-source="xai">
<h4>
<a data-i18n="xAI API Key" href="https://console.x.ai/" target="_blank" rel="noopener noreferrer">
xAI API Key
</a>
</h4>
<div class="flex-container">
<input id="api_key_xai" name="api_key_xai" class="text_pole flex1" value="" type="text" autocomplete="off">
<div title="Clear your API key" data-i18n="[title]Clear your API key" class="menu_button fa-solid fa-circle-xmark clear-api-key" data-key="api_key_xai"></div>
</div>
<div data-for="api_key_xai" class="neutral_warning" data-i18n="For privacy reasons, your API key will be hidden after you reload the page.">
For privacy reasons, your API key will be hidden after you reload the page.
</div>
<h4 data-i18n="xAI Model">xAI Model</h4>
<select id="model_xai_select">
<option value="grok-3-beta">grok-3-beta</option>
<option value="grok-3-fast-beta">grok-3-fast-beta</option>
<option value="grok-3-mini-beta">grok-3-mini-beta</option>
<option value="grok-3-mini-fast-beta">grok-3-mini-fast-beta</option>
<option value="grok-2-vision-1212">grok-2-vision-1212</option>
<option value="grok-2-1212">grok-2-1212</option>
<option value="grok-vision-beta">grok-vision-beta</option>
<option value="grok-beta">grok-beta</option>
</select>
</div>
<div id="prompt_post_porcessing_form" data-source="custom,openrouter"> <div id="prompt_post_porcessing_form" data-source="custom,openrouter">
<h4 data-i18n="Prompt Post-Processing">Prompt Post-Processing</h4> <h4 data-i18n="Prompt Post-Processing">Prompt Post-Processing</h4>
<select id="custom_prompt_post_processing" class="text_pole" title="Applies additional processing to the prompt before sending it to the API." data-i18n="[title]Applies additional processing to the prompt before sending it to the API."> <select id="custom_prompt_post_processing" class="text_pole" title="Applies additional processing to the prompt before sending it to the API." data-i18n="[title]Applies additional processing to the prompt before sending it to the API.">
@@ -3458,7 +3503,7 @@
<div class="drawer-toggle"> <div class="drawer-toggle">
<div class="drawer-icon fa-solid fa-font fa-fw closedIcon" title="AI Response Formatting" data-i18n="[title]AI Response Formatting"></div> <div class="drawer-icon fa-solid fa-font fa-fw closedIcon" title="AI Response Formatting" data-i18n="[title]AI Response Formatting"></div>
</div> </div>
<div id="AdvancedFormatting" class="drawer-content"> <div id="AdvancedFormatting" class="drawer-content closedDrawer">
<div class="flex-container alignItemsBaseline"> <div class="flex-container alignItemsBaseline">
<h3 class="margin0 flex1 flex-container alignItemsBaseline"> <h3 class="margin0 flex1 flex-container alignItemsBaseline">
<span data-i18n="Advanced Formatting"> <span data-i18n="Advanced Formatting">
@@ -3577,11 +3622,6 @@
<small data-i18n="Names as Stop Strings">Names as Stop Strings</small> <small data-i18n="Names as Stop Strings">Names as Stop Strings</small>
</label> </label>
</div> </div>
<label class="checkbox_label" title="Includes Post-History Instructions at the end of the prompt, if defined in the character card AND ''Prefer Char. Instructions'' is enabled.&#10;THIS IS NOT RECOMMENDED FOR TEXT COMPLETION MODELS, CAN LEAD TO BAD OUTPUT." data-i18n="[title]context_allow_post_history_instructions">
<input id="context_allow_jailbreak" type="checkbox" />
<small data-i18n="Allow Post-History Instructions">Allow Post-History Instructions</small>
</label>
</div> </div>
</div> </div>
</div> </div>
@@ -3783,9 +3823,7 @@
</label> </label>
</div> </div>
</h4> </h4>
<div id="SystemPromptBlock"> <div id="SystemPromptBlock" class="marginBot10">
<div class="flex-container" title="Select your current System Prompt" data-i18n="[title]Select your current System Prompt"> <div class="flex-container" title="Select your current System Prompt" data-i18n="[title]Select your current System Prompt">
<select id="sysprompt_select" data-preset-manager-for="sysprompt" class="flex1 text_pole"></select> <select id="sysprompt_select" data-preset-manager-for="sysprompt" class="flex1 text_pole"></select>
<div class="flex-container margin0 justifyCenter gap3px"> <div class="flex-container margin0 justifyCenter gap3px">
@@ -3807,10 +3845,14 @@
</label> </label>
<textarea id="sysprompt_content" class="text_pole textarea_compact autoSetHeight"></textarea> <textarea id="sysprompt_content" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
</div>
<div> <div>
&nbsp; <label for="sysprompt_post_history" class="flex-container">
<small data-i18n="Post-History Instructions">Post-History Instructions</small>
<i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="sysprompt_post_history" title="Expand the editor" data-i18n="[title]Expand the editor"></i>
</label>
<textarea id="sysprompt_post_history" class="text_pole textarea_compact autoSetHeight"></textarea>
</div>
</div> </div>
<div> <div>
@@ -5113,7 +5155,7 @@
<div id="persona_depth_position_settings" class="flex-container"> <div id="persona_depth_position_settings" class="flex-container">
<div class="flex1"> <div class="flex1">
<label for="persona_depth_value" data-i18n="Depth:">Depth:</label> <label for="persona_depth_value" data-i18n="Depth:">Depth:</label>
<input id="persona_depth_value" class="text_pole" type="number" min="0" max="999" step="1"> <input id="persona_depth_value" class="text_pole" type="number" min="0" max="9999" step="1">
</div> </div>
<div class="flex1"> <div class="flex1">
<label for="persona_depth_role" data-i18n="Role:">Role:</label> <label for="persona_depth_role" data-i18n="Role:">Role:</label>
@@ -5489,7 +5531,7 @@
<div class="inline-drawer-content"> <div class="inline-drawer-content">
<div id="currentGroupMembers" name="Current Group Members" class="flex-container flexFlowColumn overflowYAuto flex1"> <div id="currentGroupMembers" name="Current Group Members" class="flex-container flexFlowColumn overflowYAuto flex1">
<div id="rm_group_members_pagination" class="rm_group_members_pagination group_pagination"></div> <div id="rm_group_members_pagination" class="rm_group_members_pagination group_pagination"></div>
<div id="rm_group_members" class="rm_group_members overflowYAuto flex-container"></div> <div id="rm_group_members" class="rm_group_members overflowYAuto flex-container" group_empty_text="Group is empty." data-i18n="[group_empty_text]Group is empty."></div>
</div> </div>
</div> </div>
</div> </div>
@@ -5507,7 +5549,7 @@
<div class="tags rm_tag_filter"></div> <div class="tags rm_tag_filter"></div>
</div> </div>
<div id="rm_group_add_members_pagination" class="group_pagination"></div> <div id="rm_group_add_members_pagination" class="group_pagination"></div>
<div id="rm_group_add_members" class="overflowYAuto flex-container"></div> <div id="rm_group_add_members" class="overflowYAuto flex-container" no_characters_text="No characters available" data-i18n="[no_characters_text]No characters available"></div>
</div> </div>
</div> </div>
</div> </div>
@@ -5766,7 +5808,7 @@
@ Depth @ Depth
</span> </span>
</h4> </h4>
<input id="depth_prompt_depth" name="depth_prompt_depth" class="text_pole textarea_compact m-t-0" type="number" min="0" max="999" value="4" form="form_create" /> <input id="depth_prompt_depth" name="depth_prompt_depth" class="text_pole textarea_compact m-t-0" type="number" min="0" max="9999" value="4" form="form_create" />
<h4> <h4>
<span data-i18n="Role"> <span data-i18n="Role">
Role Role
@@ -5927,7 +5969,7 @@
<div class="tag_view_color_picker" data-value="color"></div> <div class="tag_view_color_picker" data-value="color"></div>
<div class="tag_view_color_picker" data-value="color2"></div> <div class="tag_view_color_picker" data-value="color2"></div>
<div class="tag_view_name" contenteditable="true"></div> <div class="tag_view_name" contenteditable="true"></div>
<div class="tag_view_counter"><span class="tag_view_counter_value"></span>&nbsp;entries</div> <div class="tag_view_counter"><span class="tag_view_counter_value"></span>&nbsp;<span data-i18n="tag_entries">entries</span></div>
<div title="Delete tag" class="tag_delete fa-solid fa-trash-can right_menu_button" data-i18n="[title]Delete tag"></div> <div title="Delete tag" class="tag_delete fa-solid fa-trash-can right_menu_button" data-i18n="[title]Delete tag"></div>
</div> </div>
</div> </div>
@@ -5987,11 +6029,11 @@
</div> </div>
<div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap"> <div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap">
<label for="depth" class="WIEntryHeaderTitleMobile" data-i18n="Depth:">Depth:</label> <label for="depth" class="WIEntryHeaderTitleMobile" data-i18n="Depth:">Depth:</label>
<input title="Depth" class="text_pole wideMax100px margin0" type="number" name="depth" data-i18n="[title]Depth" placeholder="" min="0" max="999" /> <input title="Depth" class="text_pole wideMax100px margin0" type="number" name="depth" data-i18n="[title]Depth" placeholder="" min="0" max="9999" />
</div> </div>
<div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap"> <div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap">
<label for="order" class="WIEntryHeaderTitleMobile" data-i18n="Order:">Order:</label> <label for="order" class="WIEntryHeaderTitleMobile" data-i18n="Order:">Order:</label>
<input title="Order" data-i18n="[title]Order" class="text_pole wideMax100px margin0" type="number" name="order" placeholder="" min="0" max="999" /> <input title="Order" data-i18n="[title]Order" class="text_pole wideMax100px margin0" type="number" name="order" placeholder="" min="0" max="9999" />
</div> </div>
<div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap probabilityContainer"> <div class="world_entry_form_control wi-enter-footer-text flex-container flexNoGap probabilityContainer">
<label for="order" class="WIEntryHeaderTitleMobile" data-i18n="Trigger %:">Trigger %:</label> <label for="order" class="WIEntryHeaderTitleMobile" data-i18n="Trigger %:">Trigger %:</label>
@@ -6247,6 +6289,54 @@
</label> </label>
</div> </div>
</div> </div>
<div class="inline-drawer wide100p flexFlowColumn">
<div class="inline-drawer-toggle inline-drawer-header inline-drawer-header-pointer userSettingsInnerExpandable">
<strong data-i18n="Additional Matching Sources">Additional Matching Sources</strong>
<div class="fa-solid fa-circle-chevron-down inline-drawer-icon down"></div>
</div>
<div class="inline-drawer-content flex-container flexFlowRow flexGap10 paddingBottom5px">
<small class="flex-container flex1 flexFlowColumn">
<label class="checkbox flex-container alignItemsCenter flexNoGap">
<input type="checkbox" name="matchCharacterDescription" />
<span data-i18n="Character Description">
Character Description
</span>
</label>
<label class="checkbox flex-container alignItemsCenter flexNoGap">
<input type="checkbox" name="matchCharacterPersonality" />
<span data-i18n="Character Personality">
Character Personality
</span>
</label>
<label class="checkbox flex-container alignItemsCenter flexNoGap">
<input type="checkbox" name="matchScenario" />
<span data-i18n="Scenario">
Scenario
</span>
</label>
</small>
<small class="flex-container flex1 flexFlowColumn">
<label class="checkbox flex-container alignItemsCenter flexNoGap">
<input type="checkbox" name="matchPersonaDescription" />
<span data-i18n="Persona Description">
Persona Description
</span>
</label>
<label class="checkbox flex-container alignItemsCenter flexNoGap">
<input type="checkbox" name="matchCharacterDepthPrompt" />
<span data-i18n="Character's Note">
Character's Note
</span>
</label>
<label class="checkbox flex-container alignItemsCenter flexNoGap">
<input type="checkbox" name="matchCreatorNotes" />
<span data-i18n="Creator's Notes">
Creator's Notes
</span>
</label>
</small>
</div>
</div>
</div> </div>
</div> </div>
</form> </form>
@@ -6353,7 +6443,7 @@
<span data-i18n="prompt_manager_depth">Depth</span> <span data-i18n="prompt_manager_depth">Depth</span>
</label> </label>
<div class="text_muted" data-i18n="Injection depth. 0 = after the last message, 1 = before the last message, etc.">Injection depth. 0 = after the last message, 1 = before the last message, etc.</div> <div class="text_muted" data-i18n="Injection depth. 0 = after the last message, 1 = before the last message, etc.">Injection depth. 0 = after the last message, 1 = before the last message, etc.</div>
<input id="completion_prompt_manager_popup_entry_form_injection_depth" class="text_pole" type="number" name="injection_depth" min="0" max="999" value="4" /> <input id="completion_prompt_manager_popup_entry_form_injection_depth" class="text_pole" type="number" name="injection_depth" min="0" max="9999" value="4" />
</div> </div>
</div> </div>
<div class="completion_prompt_manager_popup_entry_form_control"> <div class="completion_prompt_manager_popup_entry_form_control">
@@ -6614,7 +6704,7 @@
</div> </div>
<div class="flex-container wide100pLess70px character_select_container height100p alignitemscenter"> <div class="flex-container wide100pLess70px character_select_container height100p alignitemscenter">
<div class="wide100p character_name_block"> <div class="wide100p character_name_block">
<span class="ch_name">Go back</span> <span class="ch_name" data-i18n="Go back">Go back</span>
</div> </div>
</div> </div>
</div> </div>
@@ -6713,7 +6803,7 @@
<label class="checkbox_label alignItemsCenter" for="extension_floating_position_depth"> <label class="checkbox_label alignItemsCenter" for="extension_floating_position_depth">
<input type="radio" id="extension_floating_position_depth" name="extension_floating_position" value="1" /> <input type="radio" id="extension_floating_position_depth" name="extension_floating_position" value="1" />
<span data-i18n="In-chat @ Depth">In-chat @ Depth</span> <span data-i18n="In-chat @ Depth">In-chat @ Depth</span>
<input id="extension_floating_depth" class="text_pole textarea_compact widthNatural" type="number" min="0" max="999" /> <input id="extension_floating_depth" class="text_pole textarea_compact widthNatural" type="number" min="0" max="9999" />
<span data-i18n="as">as</span> <span data-i18n="as">as</span>
<select id="extension_floating_role" class="text_pole widthNatural"> <select id="extension_floating_role" class="text_pole widthNatural">
<option data-i18n="System" value="0">System</option> <option data-i18n="System" value="0">System</option>
@@ -6728,7 +6818,7 @@
<span data-i18n="Insertion Frequency">Insertion Frequency</span> <span data-i18n="Insertion Frequency">Insertion Frequency</span>
<small data-i18n="(0 = Disable, 1 = Always)">(0 = Disable, 1 = Always)</small> <small data-i18n="(0 = Disable, 1 = Always)">(0 = Disable, 1 = Always)</small>
</label> </label>
<input id="extension_floating_interval" class="text_pole widthUnset" type="number" min="0" max="999" /> <input id="extension_floating_interval" class="text_pole widthUnset" type="number" min="0" max="9999" />
</div> </div>
<br> <br>
<span><span data-i18n="User inputs until next insertion:">User inputs until next insertion:</span> <span id="extension_floating_counter">(disabled)</span></span> <span><span data-i18n="User inputs until next insertion:">User inputs until next insertion:</span> <span id="extension_floating_counter">(disabled)</span></span>
@@ -6798,7 +6888,7 @@
<label class="checkbox_label alignItemsCenter" for="extension_default_position_depth"> <label class="checkbox_label alignItemsCenter" for="extension_default_position_depth">
<input type="radio" id="extension_default_position_depth" name="extension_default_position" value="1" /> <input type="radio" id="extension_default_position_depth" name="extension_default_position" value="1" />
<span data-i18n="In-chat @ Depth">In-chat @ Depth</span> <span data-i18n="In-chat @ Depth">In-chat @ Depth</span>
<input id="extension_default_depth" class="text_pole textarea_compact widthNatural" type="number" min="0" max="999" /> <input id="extension_default_depth" class="text_pole textarea_compact widthNatural" type="number" min="0" max="9999" />
<span data-i18n="as">as</span> <span data-i18n="as">as</span>
<select id="extension_default_role" class="text_pole widthNatural"> <select id="extension_default_role" class="text_pole widthNatural">
<option data-i18n="System" value="0">System</option> <option data-i18n="System" value="0">System</option>
@@ -6812,7 +6902,7 @@
<span data-i18n="Insertion Frequency">Insertion Frequency</span> <span data-i18n="Insertion Frequency">Insertion Frequency</span>
<small data-i18n="(0 = Disable, 1 = Always)">(0 = Disable, 1 = Always)</small> <small data-i18n="(0 = Disable, 1 = Always)">(0 = Disable, 1 = Always)</small>
</label> </label>
<input id="extension_default_interval" class="text_pole widthUnset" type="number" min="0" max="999" /> <input id="extension_default_interval" class="text_pole widthUnset" type="number" min="0" max="9999" />
</div> </div>
</div> </div>
</div> </div>

View File

@@ -411,7 +411,6 @@
"Chat Start": "بداية الدردشة", "Chat Start": "بداية الدردشة",
"Add Chat Start and Example Separator to a list of stopping strings.": "أضف بداية الدردشة وفاصل الأمثلة إلى قائمة سلاسل التوقف.", "Add Chat Start and Example Separator to a list of stopping strings.": "أضف بداية الدردشة وفاصل الأمثلة إلى قائمة سلاسل التوقف.",
"Use as Stop Strings": "استخدم كسلاسل التوقف", "Use as Stop Strings": "استخدم كسلاسل التوقف",
"context_allow_jailbreak": "يتضمن كسر الحماية في نهاية المطالبة، إذا تم تحديده في بطاقة الشخصية و''Prefer Char. تم تمكين الهروب من السجن.\nلا يُنصح بهذا بالنسبة لنماذج إكمال النص، فقد يؤدي إلى نتائج سيئة.",
"Allow Jailbreak": "السماح بالجيلبريك", "Allow Jailbreak": "السماح بالجيلبريك",
"Context Order": "ترتيب السياق", "Context Order": "ترتيب السياق",
"Summary": "ملخص", "Summary": "ملخص",

View File

@@ -411,7 +411,6 @@
"Chat Start": "Chat-Start", "Chat Start": "Chat-Start",
"Add Chat Start and Example Separator to a list of stopping strings.": "Fügen Sie einer Liste von Stoppzeichenfolgen „Chat-Start“ und „Beispieltrennzeichen“ hinzu.", "Add Chat Start and Example Separator to a list of stopping strings.": "Fügen Sie einer Liste von Stoppzeichenfolgen „Chat-Start“ und „Beispieltrennzeichen“ hinzu.",
"Use as Stop Strings": "Verwende als Stoppzeichenfolgen", "Use as Stop Strings": "Verwende als Stoppzeichenfolgen",
"context_allow_jailbreak": "Schließt Jailbreak am Ende der Eingabeaufforderung ein, wenn dies in der Charakterkarte definiert ist UND „Charakter-Jailbreak bevorzugen“ aktiviert ist.\nDIES WIRD FÜR TEXTVERVOLLSTÄNDIGUNGSMODELLE NICHT EMPFOHLEN, KANN ZU SCHLECHTEN AUSGABEN FÜHREN.",
"Allow Jailbreak": "Jailbreak zulassen", "Allow Jailbreak": "Jailbreak zulassen",
"Context Order": "Kontextreihenfolge", "Context Order": "Kontextreihenfolge",
"Summary": "Zusammenfassung", "Summary": "Zusammenfassung",

View File

@@ -411,7 +411,6 @@
"Chat Start": "Inicio de chat", "Chat Start": "Inicio de chat",
"Add Chat Start and Example Separator to a list of stopping strings.": "Agregue Inicio de chat y Separador de ejemplo a una lista de cadenas de parada.", "Add Chat Start and Example Separator to a list of stopping strings.": "Agregue Inicio de chat y Separador de ejemplo a una lista de cadenas de parada.",
"Use as Stop Strings": "Usar como Cadenas de Parada", "Use as Stop Strings": "Usar como Cadenas de Parada",
"context_allow_jailbreak": "Incluye Jailbreak al final del mensaje, si está definido en la tarjeta de personaje Y está habilitado \"Prefer Char. Jailbreak\".\nESTO NO SE RECOMIENDA PARA MODELOS DE COMPLETO DE TEXTO, PUEDE PRODUCIR UN RESULTADO INCORRECTO.",
"Allow Jailbreak": "Permitir Jailbreak", "Allow Jailbreak": "Permitir Jailbreak",
"Context Order": "Orden de contexto", "Context Order": "Orden de contexto",
"Summary": "Resumen", "Summary": "Resumen",

View File

@@ -1448,7 +1448,6 @@
"Add Character and User names to a list of stopping strings.": "Ajouter les noms de personnages et d'utilisateurs à une liste de chaînes d'arrêt.", "Add Character and User names to a list of stopping strings.": "Ajouter les noms de personnages et d'utilisateurs à une liste de chaînes d'arrêt.",
"Names as Stop Strings": "Noms comme chaînes d'arrêt", "Names as Stop Strings": "Noms comme chaînes d'arrêt",
"context_allow_post_history_instructions": "Inclut les instructions post-historiques à la fin du prompt, si elles sont définies dans la fiche de personnage ET si l'option 'Préférer les instructions de personnage' est activée.\nN'EST PAS RECOMMANDÉ POUR LES MODÈLES DE COMPLÉTION DE TEXTE, CAR IL PEUT ENTRAÎNER DE MAUVAIS RÉSULTATS.", "context_allow_post_history_instructions": "Inclut les instructions post-historiques à la fin du prompt, si elles sont définies dans la fiche de personnage ET si l'option 'Préférer les instructions de personnage' est activée.\nN'EST PAS RECOMMANDÉ POUR LES MODÈLES DE COMPLÉTION DE TEXTE, CAR IL PEUT ENTRAÎNER DE MAUVAIS RÉSULTATS.",
"Allow Post-History Instructions": "Autoriser les instructions post-histoire",
"Instruct Template": "Modèle d'instruction", "Instruct Template": "Modèle d'instruction",
"instruct_derived": "Dériver des métadonnées du modèle, si possible.", "instruct_derived": "Dériver des métadonnées du modèle, si possible.",
"instruct_enabled": "Activer le mode d'instruction", "instruct_enabled": "Activer le mode d'instruction",

View File

@@ -411,7 +411,6 @@
"Chat Start": "Chat Start", "Chat Start": "Chat Start",
"Add Chat Start and Example Separator to a list of stopping strings.": "Bættu Chat Start og Example Separator við lista yfir stöðvunarstrengi.", "Add Chat Start and Example Separator to a list of stopping strings.": "Bættu Chat Start og Example Separator við lista yfir stöðvunarstrengi.",
"Use as Stop Strings": "Nota sem Stoppa Strengir", "Use as Stop Strings": "Nota sem Stoppa Strengir",
"context_allow_jailbreak": "Inniheldur Jailbreak í lok hvetjunnar, ef það er skilgreint á stafkortinu OG ''Velst Char. Jailbreak'' er virkt.\nÞETTA ER EKKI MÆLT FYRIR TEXTAÚRSLUNARGERÐ, GETUR leitt til lélegrar úttaks.",
"Allow Jailbreak": "Leyfa jailbreak", "Allow Jailbreak": "Leyfa jailbreak",
"Context Order": "Samhengisröð", "Context Order": "Samhengisröð",
"Summary": "Samantekt", "Summary": "Samantekt",

View File

@@ -411,7 +411,6 @@
"Chat Start": "Inizio chat", "Chat Start": "Inizio chat",
"Add Chat Start and Example Separator to a list of stopping strings.": "Aggiungi Inizio chat e Separatore di esempio a un elenco di stringhe di arresto.", "Add Chat Start and Example Separator to a list of stopping strings.": "Aggiungi Inizio chat e Separatore di esempio a un elenco di stringhe di arresto.",
"Use as Stop Strings": "Usa come stringhe di arresto", "Use as Stop Strings": "Usa come stringhe di arresto",
"context_allow_jailbreak": "Include il jailbreak alla fine del prompt, se definito nella carta personaggio E ''Preferisci Char. Il jailbreak'' è abilitato.\nQUESTO NON È CONSIGLIATO PER I MODELLI DI COMPLETAMENTO DEL TESTO, PUÒ PORTARE A UN RISULTATO CATTIVO.",
"Allow Jailbreak": "Consenti jailbreak", "Allow Jailbreak": "Consenti jailbreak",
"Context Order": "Ordine del contesto", "Context Order": "Ordine del contesto",
"Summary": "Riepilogo", "Summary": "Riepilogo",

View File

@@ -411,7 +411,6 @@
"Chat Start": "チャット開始", "Chat Start": "チャット開始",
"Add Chat Start and Example Separator to a list of stopping strings.": "停止文字列のリストにチャット開始と例の区切り文字を追加します。", "Add Chat Start and Example Separator to a list of stopping strings.": "停止文字列のリストにチャット開始と例の区切り文字を追加します。",
"Use as Stop Strings": "ストップ文字列として使用", "Use as Stop Strings": "ストップ文字列として使用",
"context_allow_jailbreak": "文字カードで定義されていて、「文字 Jailbreak を優先」が有効になっている場合は、プロンプトの最後に Jailbreak が含まれます。\nこれはテキスト補完モデルには推奨されません。出力が悪くなる可能性があります。",
"Allow Jailbreak": "脱獄を許可する", "Allow Jailbreak": "脱獄を許可する",
"Context Order": "コンテキスト順序", "Context Order": "コンテキスト順序",
"Summary": "まとめ", "Summary": "まとめ",

View File

@@ -421,7 +421,6 @@
"Chat Start": "채팅 시작", "Chat Start": "채팅 시작",
"Add Chat Start and Example Separator to a list of stopping strings.": "중지 문자열 목록에 채팅 시작 및 예제 구분 기호를 추가합니다.", "Add Chat Start and Example Separator to a list of stopping strings.": "중지 문자열 목록에 채팅 시작 및 예제 구분 기호를 추가합니다.",
"Use as Stop Strings": "중지 문자열로 사용", "Use as Stop Strings": "중지 문자열로 사용",
"context_allow_jailbreak": "캐릭터 카드에 정의되어 있고 ''Prefer Char. Jailbreak''가 활성화되어 있는 경우 프롬프트 끝에 Jailbreak를 포함합니다.\n이는 텍스트 완성 모델에 권장되지 않으며, 나쁜 출력으로 이어질 수 있습니다.",
"Allow Jailbreak": "탈옥 허용", "Allow Jailbreak": "탈옥 허용",
"Context Order": "컨텍스트 순서", "Context Order": "컨텍스트 순서",
"Summary": "요약", "Summary": "요약",
@@ -1520,7 +1519,6 @@
"Always": "항상 추가함", "Always": "항상 추가함",
"Separators as Stop Strings": "구분 기호를 정지 문자열로 사용하기", "Separators as Stop Strings": "구분 기호를 정지 문자열로 사용하기",
"Names as Stop Strings": "캐릭터의 이름들을 정지 문자열로 사용하기", "Names as Stop Strings": "캐릭터의 이름들을 정지 문자열로 사용하기",
"Allow Post-History Instructions": "Post-History 지침 허용",
"Image Captioning": "이미지 캡셔닝", "Image Captioning": "이미지 캡셔닝",
"Automatically caption images": "자동으로 이미지에 대한 설명 문장으로 나타내기", "Automatically caption images": "자동으로 이미지에 대한 설명 문장으로 나타내기",
"Edit captions before saving": "저장하기 전에 이미지에 대한 설명 문장 편집하기", "Edit captions before saving": "저장하기 전에 이미지에 대한 설명 문장 편집하기",

View File

@@ -411,7 +411,6 @@
"Chat Start": "Chatstart", "Chat Start": "Chatstart",
"Add Chat Start and Example Separator to a list of stopping strings.": "Voeg Chat Start en Voorbeeldscheidingsteken toe aan een lijst met stoptekenreeksen.", "Add Chat Start and Example Separator to a list of stopping strings.": "Voeg Chat Start en Voorbeeldscheidingsteken toe aan een lijst met stoptekenreeksen.",
"Use as Stop Strings": "Gebruik als stopreeksen", "Use as Stop Strings": "Gebruik als stopreeksen",
"context_allow_jailbreak": "Inclusief jailbreak aan het einde van de prompt, indien gedefinieerd in de karakterkaart EN ''Prefer Char. Jailbreak'' is ingeschakeld.\nDIT WORDT NIET AANBEVOLEN VOOR MODELLEN VOOR HET INVOEREN VAN TEKST. KAN TOT SLECHTE UITVOER LEIDEN.",
"Allow Jailbreak": "Jailbreak toestaan", "Allow Jailbreak": "Jailbreak toestaan",
"Context Order": "Contextvolgorde", "Context Order": "Contextvolgorde",
"Summary": "Samenvatting", "Summary": "Samenvatting",

View File

@@ -411,7 +411,6 @@
"Chat Start": "Início do Chat", "Chat Start": "Início do Chat",
"Add Chat Start and Example Separator to a list of stopping strings.": "Adicione o início do bate-papo e o separador de exemplo a uma lista de strings de parada.", "Add Chat Start and Example Separator to a list of stopping strings.": "Adicione o início do bate-papo e o separador de exemplo a uma lista de strings de parada.",
"Use as Stop Strings": "Usar como Strings de Parada", "Use as Stop Strings": "Usar como Strings de Parada",
"context_allow_jailbreak": "Inclui Jailbreak no final do prompt, se definido no cartão de personagem E ''Prefer Char. Jailbreak'' está habilitado.\nISTO NÃO É RECOMENDADO PARA MODELOS DE COMPLEMENTAÇÃO DE TEXTO, PODE LEVAR A UMA SAÍDA RUIM.",
"Allow Jailbreak": "Permitir jailbreak", "Allow Jailbreak": "Permitir jailbreak",
"Context Order": "Ordem de Contexto", "Context Order": "Ordem de Contexto",
"Summary": "Resumo", "Summary": "Resumo",

View File

@@ -52,7 +52,7 @@
"Presence Penalty": "Штраф за присутствие", "Presence Penalty": "Штраф за присутствие",
"Top A": "Top А", "Top A": "Top А",
"Tail Free Sampling": "Tail Free Sampling", "Tail Free Sampling": "Tail Free Sampling",
"Rep. Pen. Slope": "Rep. Pen. Slope", "Rep. Pen. Slope": "Рост штрафа за повтор к концу промпта",
"Top K": "Top K", "Top K": "Top K",
"Top P": "Top P", "Top P": "Top P",
"Do Sample": "Включить сэмплинг", "Do Sample": "Включить сэмплинг",
@@ -162,9 +162,9 @@
"Story String": "Строка истории", "Story String": "Строка истории",
"Example Separator": "Разделитель примеров сообщений", "Example Separator": "Разделитель примеров сообщений",
"Chat Start": "Начало чата", "Chat Start": "Начало чата",
"Activation Regex": "Regex для активации", "Activation Regex": "Рег. выражение для активации",
"Instruct Mode": "Режим Instruct", "Instruct Mode": "Режим Instruct",
"Wrap Sequences with Newline": "Отделять строки символом новой строки", "Wrap Sequences with Newline": "Каждая строка из шаблона на новой строке",
"Include Names": "Добавлять имена", "Include Names": "Добавлять имена",
"Force for Groups and Personas": "Также для групп и персон", "Force for Groups and Personas": "Также для групп и персон",
"System Prompt": "Системный промпт", "System Prompt": "Системный промпт",
@@ -299,7 +299,7 @@
"AI Horde": "AI Horde", "AI Horde": "AI Horde",
"NovelAI": "NovelAI", "NovelAI": "NovelAI",
"OpenAI API key": "Ключ для API OpenAI", "OpenAI API key": "Ключ для API OpenAI",
"Trim spaces": "Обрезать пробелы", "Trim spaces": "Обрезать пробелы в начале и конце",
"Trim Incomplete Sentences": "Удалять неоконченные предложения", "Trim Incomplete Sentences": "Удалять неоконченные предложения",
"Include Newline": "Добавлять новую строку", "Include Newline": "Добавлять новую строку",
"Non-markdown strings": "Строки без разметки", "Non-markdown strings": "Строки без разметки",
@@ -510,7 +510,7 @@
"New preset": "Новый пресет", "New preset": "Новый пресет",
"Delete preset": "Удалить пресет", "Delete preset": "Удалить пресет",
"API Connections": "Соединения с API", "API Connections": "Соединения с API",
"Can help with bad responses by queueing only the approved workers. May slowdown the response time.": "Может помочь с плохими ответами ставя в очередь только подтвержденных работников. Может замедлить время ответа.", "Can help with bad responses by queueing only the approved workers. May slowdown the response time.": "Может помочь при плохих ответах, делая запросы только к доверенным рабочим машинам. Может замедлить время ответа.",
"Clear your API key": "Стереть ключ от API", "Clear your API key": "Стереть ключ от API",
"Refresh models": "Обновить модели", "Refresh models": "Обновить модели",
"Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Получите свой OpenRouter API токен используя OAuth. У вас будет открыта вкладка openrouter.ai", "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Получите свой OpenRouter API токен используя OAuth. У вас будет открыта вкладка openrouter.ai",
@@ -551,7 +551,7 @@
"Token counts may be inaccurate and provided just for reference.": "Счетчик токенов может быть неточным, используйте как ориентир", "Token counts may be inaccurate and provided just for reference.": "Счетчик токенов может быть неточным, используйте как ориентир",
"Click to select a new avatar for this character": "Нажмите чтобы выбрать новый аватар для этого персонажа", "Click to select a new avatar for this character": "Нажмите чтобы выбрать новый аватар для этого персонажа",
"Example: [{{user}} is a 28-year-old Romanian cat girl.]": "Пример:\n [{{user}} is a 28-year-old Romanian cat girl.]", "Example: [{{user}} is a 28-year-old Romanian cat girl.]": "Пример:\n [{{user}} is a 28-year-old Romanian cat girl.]",
"Toggle grid view": "Переключить вид сетки", "Toggle grid view": "Сменить вид сетки",
"Add to Favorites": "Добавить в Избранное", "Add to Favorites": "Добавить в Избранное",
"Advanced Definition": "Расширенное описание", "Advanced Definition": "Расширенное описание",
"Character Lore": "Лор персонажа", "Character Lore": "Лор персонажа",
@@ -624,7 +624,7 @@
"UI Theme": "Тема UI", "UI Theme": "Тема UI",
"This message is invisible for the AI": "Это сообщение невидимо для ИИ", "This message is invisible for the AI": "Это сообщение невидимо для ИИ",
"Sampler Priority": "Приоритет сэмплеров", "Sampler Priority": "Приоритет сэмплеров",
"Ooba only. Determines the order of samplers.": "Только oobabooga. Определяет порядок сэмплеров.", "Ooba only. Determines the order of samplers.": "Только для oobabooga. Определяет порядок сэмплеров.",
"Load default order": "Загрузить стандартный порядок", "Load default order": "Загрузить стандартный порядок",
"Max Tokens Second": "Макс. кол-во токенов в секунду", "Max Tokens Second": "Макс. кол-во токенов в секунду",
"CFG": "CFG", "CFG": "CFG",
@@ -695,7 +695,7 @@
"Medium": "Средний", "Medium": "Средний",
"Aggressive": "Агрессивный", "Aggressive": "Агрессивный",
"Very aggressive": "Очень агрессивный", "Very aggressive": "Очень агрессивный",
"Eta_Cutoff_desc": "Eta cutoff - основной параметр специальной техники сэмплинга под названием Eta Sampling.&#13;В единицах 1e-4; разумное значение - 3.&#13;Установите в 0, чтобы отключить.&#13;См. статью Truncation Sampling as Language Model Desmoothing от Хьюитт и др. (2022) для получения подробной информации.", "Eta_Cutoff_desc": "Eta cutoff - основной параметр специальной техники сэмплинга под названием Eta Sampling.\nВ единицах 1e-4; разумное значение - 3.\nУстановите в 0, чтобы отключить.\nСм. статью Truncation Sampling as Language Model Desmoothing от Хьюитт и др. (2022) для получения подробной информации.",
"Learn how to contribute your idle GPU cycles to the Horde": "Узнайте, как использовать время простоя вашего GPU для помощи Horde", "Learn how to contribute your idle GPU cycles to the Horde": "Узнайте, как использовать время простоя вашего GPU для помощи Horde",
"Use the appropriate tokenizer for Google models via their API. Slower prompt processing, but offers much more accurate token counting.": "Используйте соответствующий токенизатор для моделей Google через их API. Медленная обработка подсказок, но предлагает намного более точный подсчет токенов.", "Use the appropriate tokenizer for Google models via their API. Slower prompt processing, but offers much more accurate token counting.": "Используйте соответствующий токенизатор для моделей Google через их API. Медленная обработка подсказок, но предлагает намного более точный подсчет токенов.",
"Load koboldcpp order": "Загрузить порядок из koboldcpp", "Load koboldcpp order": "Загрузить порядок из koboldcpp",
@@ -964,7 +964,7 @@
"char_import_3": "Персонаж с JanitorAI (прямая ссылка или UUID)", "char_import_3": "Персонаж с JanitorAI (прямая ссылка или UUID)",
"char_import_4": "Персонаж с Pygmalion.chat (прямая ссылка или UUID)", "char_import_4": "Персонаж с Pygmalion.chat (прямая ссылка или UUID)",
"char_import_5": "Персонаж с AICharacterCards.com (прямая ссылка или ID)", "char_import_5": "Персонаж с AICharacterCards.com (прямая ссылка или ID)",
"char_import_6": "Прямая ссылка на PNG-файл (чтобы узнать список разрешённых хостов, загляните в", "char_import_6": "Прямая ссылка на PNG-файл (список разрешённых хостов находится в",
"char_import_7": ")", "char_import_7": ")",
"Grammar String": "Грамматика", "Grammar String": "Грамматика",
"GBNF or EBNF, depends on the backend in use. If you're using this you should know which.": "GBNF или EBNF, зависит от бэкенда. Если вы это используете, то, скорее всего, сами знаете, какой именно.", "GBNF or EBNF, depends on the backend in use. If you're using this you should know which.": "GBNF или EBNF, зависит от бэкенда. Если вы это используете, то, скорее всего, сами знаете, какой именно.",
@@ -1016,7 +1016,7 @@
"prompt_manager_relative": "Относительная", "prompt_manager_relative": "Относительная",
"prompt_manager_depth": "Глубина", "prompt_manager_depth": "Глубина",
"Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Глубина вставки. 0 = после последнего сообщения, 1 = перед последним сообщением, и т.д.", "Injection depth. 0 = after the last message, 1 = before the last message, etc.": "Глубина вставки. 0 = после последнего сообщения, 1 = перед последним сообщением, и т.д.",
"The prompt to be sent.": "Отправляемый ИИ промпт.", "The prompt to be sent.": "Текст промпта.",
"prompt_manager_forbid_overrides": "Запретить перезапись", "prompt_manager_forbid_overrides": "Запретить перезапись",
"This prompt cannot be overridden by character cards, even if overrides are preferred.": "Карточка персонажа не сможет перезаписать этот промпт, даже если настройки отдают приоритет именно ей.", "This prompt cannot be overridden by character cards, even if overrides are preferred.": "Карточка персонажа не сможет перезаписать этот промпт, даже если настройки отдают приоритет именно ей.",
"image_inlining_hint_1": "Отправлять картинки как часть промпта, если позволяет модель (такой функционал поддерживают GPT-4V, Claude 3 или Llava 13B). Чтобы добавить в чат изображение, используйте на нужном сообщении действие", "image_inlining_hint_1": "Отправлять картинки как часть промпта, если позволяет модель (такой функционал поддерживают GPT-4V, Claude 3 или Llava 13B). Чтобы добавить в чат изображение, используйте на нужном сообщении действие",
@@ -1232,7 +1232,7 @@
"Top P & Min P": "Top P & Min P", "Top P & Min P": "Top P & Min P",
"llama.cpp only. Determines the order of samplers. If Mirostat mode is not 0, sampler order is ignored.": "llama.cpp only. Determines the order of samplers. If Mirostat mode is not 0, sampler order is ignored.", "llama.cpp only. Determines the order of samplers. If Mirostat mode is not 0, sampler order is ignored.": "llama.cpp only. Determines the order of samplers. If Mirostat mode is not 0, sampler order is ignored.",
"Helps the model to associate messages with characters.": "Помогает модели связывать сообщения с персонажами.", "Helps the model to associate messages with characters.": "Помогает модели связывать сообщения с персонажами.",
"character_names_default": "Except for groups and past personas. Otherwise, make sure you provide names in the prompt.", "character_names_default": "Добавлять префиксы для групповых чатов и предыдущих персон. В остальных случаях указывайте имена в промпте иными способами.",
"Completion": "Completion Object", "Completion": "Completion Object",
"character_names_completion": "Только латинские буквы, цифры и знак подчёркивания. Работает не для всех бэкендов, в частности для Claude, MistralAI, Google.", "character_names_completion": "Только латинские буквы, цифры и знак подчёркивания. Работает не для всех бэкендов, в частности для Claude, MistralAI, Google.",
"Use AI21 Tokenizer": "Использовать токенайзер AI21", "Use AI21 Tokenizer": "Использовать токенайзер AI21",
@@ -1257,7 +1257,6 @@
"Peek a password": "Посмотреть пароль", "Peek a password": "Посмотреть пароль",
"Clear your cookie": "Clear your cookie", "Clear your cookie": "Clear your cookie",
"Add Chat Start and Example Separator to a list of stopping strings.": "Использовать Начало чата и Разделитель примеров сообщений в качестве стоп-строк.", "Add Chat Start and Example Separator to a list of stopping strings.": "Использовать Начало чата и Разделитель примеров сообщений в качестве стоп-строк.",
"context_allow_jailbreak": "Если в карточке есть джейлбрейк И ПРИ ЭТОМ включена опция \"Приоритет джейлбрейку из карточки персонажа\", то этот джейлбрейк добавляется в конец промпта.\nНЕ РЕКОМЕНДУЕТСЯ ДЛЯ МОДЕЛЕЙ TEXT COMPLETION, МОЖЕТ ПОРТИТЬ ВЫХОДНОЙ ТЕКСТ.",
"Context Order": "Context Order", "Context Order": "Context Order",
"Summary": "Summary", "Summary": "Summary",
"Example Dialogues": "Примеры диалогов", "Example Dialogues": "Примеры диалогов",
@@ -1278,7 +1277,7 @@
"Will be inserted as a last prompt line when using system/neutral generation.": "Will be inserted as a last prompt line when using system/neutral generation.", "Will be inserted as a last prompt line when using system/neutral generation.": "Will be inserted as a last prompt line when using system/neutral generation.",
"If a stop sequence is generated, everything past it will be removed from the output (inclusive).": "Если ИИ генерирует стоп-строку, то всё после неё будет вырезано из ответа (включая и саму стоп-строку).", "If a stop sequence is generated, everything past it will be removed from the output (inclusive).": "Если ИИ генерирует стоп-строку, то всё после неё будет вырезано из ответа (включая и саму стоп-строку).",
"Will be inserted at the start of the chat history if it doesn't start with a User message.": "Вставляется в начале истории чата, если она начинается не с сообщения пользователя.", "Will be inserted at the start of the chat history if it doesn't start with a User message.": "Вставляется в начале истории чата, если она начинается не с сообщения пользователя.",
"Global World Info/Lorebook activation settings": "Настройки активации глобального лорбука / Информации о мире", "Global World Info/Lorebook activation settings": "Глобальные настройки активации лорбука / Информации о мире",
"Click to expand": "Щёлкните, чтобы развернуть", "Click to expand": "Щёлкните, чтобы развернуть",
"Insertion Strategy": "Как инжектить", "Insertion Strategy": "Как инжектить",
"Only the entries with the most number of key matches will be selected for Inclusion Group filtering": "Only the entries with the most number of key matches will be selected for Inclusion Group filtering", "Only the entries with the most number of key matches will be selected for Inclusion Group filtering": "Only the entries with the most number of key matches will be selected for Inclusion Group filtering",
@@ -1647,10 +1646,9 @@
"mui_reset": "Сброс", "mui_reset": "Сброс",
"Quick 'Impersonate' button": "Быстрое перевоплощение", "Quick 'Impersonate' button": "Быстрое перевоплощение",
"Show a button in the input area to ask the AI to impersonate your character for a single message": "Показать в поле ввода кнопку, по нажатии на которую ИИ сгенерирует одно сообщение от лица вашего персонажа.", "Show a button in the input area to ask the AI to impersonate your character for a single message": "Показать в поле ввода кнопку, по нажатии на которую ИИ сгенерирует одно сообщение от лица вашего персонажа.",
"Separators as Stop Strings": "Разделители как стоп-строки", "Separators as Stop Strings": "Разделители в качестве стоп-строк",
"Names as Stop Strings": "Имена как стоп-строки", "Names as Stop Strings": "Имена в качестве стоп-строк",
"Add Character and User names to a list of stopping strings.": "Добавлять имена персонажа и пользователя в список стоп-строк.", "Add Character and User names to a list of stopping strings.": "Добавлять имена персонажа и пользователя в список стоп-строк.",
"Allow Post-History Instructions": "Разрешить инструкции после истории",
"context_allow_post_history_instructions": "Добавлять в конец промпта инструкции после истории. Работает только при наличии таких инструкций в карточке И при включенной опции ''Приоритет инструкциям из карточек''.\nНЕ РЕКОМЕНДУЕТСЯ ДЛЯ МОДЕЛЕЙ TEXT COMPLETION, МОЖЕТ ПОРТИТЬ ВЫХОДНОЙ ТЕКСТ.", "context_allow_post_history_instructions": "Добавлять в конец промпта инструкции после истории. Работает только при наличии таких инструкций в карточке И при включенной опции ''Приоритет инструкциям из карточек''.\nНЕ РЕКОМЕНДУЕТСЯ ДЛЯ МОДЕЛЕЙ TEXT COMPLETION, МОЖЕТ ПОРТИТЬ ВЫХОДНОЙ ТЕКСТ.",
"First User Prefix": "Первый префикс пользователя", "First User Prefix": "Первый префикс пользователя",
"Inserted before the first User's message.": "Вставляется перед первым сообщением пользователя.", "Inserted before the first User's message.": "Вставляется перед первым сообщением пользователя.",
@@ -1916,8 +1914,8 @@
"Cannot restore GUI preset": "Пресет для Gui восстановить нельзя", "Cannot restore GUI preset": "Пресет для Gui восстановить нельзя",
"Default preset cannot be restored": "Невозможно восстановить пресет по умолчанию", "Default preset cannot be restored": "Невозможно восстановить пресет по умолчанию",
"Default template cannot be restored": "Невозможно восстановить шаблон по умолчанию", "Default template cannot be restored": "Невозможно восстановить шаблон по умолчанию",
"Resetting a <b>default preset</b> will restore the default settings": "Сброс <b>стандартного пресета</b> восстановит настройки по умолчанию.", "Resetting a <b>default preset</b> will restore the default settings.": "Сброс <b>комплектного пресета</b> восстановит настройки по умолчанию.",
"Resetting a <b>default template</b> will restore the default settings.": "Сброс <b>стандартного шаблона</b> восстановит настройки по умолчанию.", "Resetting a <b>default template</b> will restore the default settings.": "Сброс <b>комплектного шаблона</b> восстановит настройки по умолчанию.",
"Are you sure?": "Вы уверены?", "Are you sure?": "Вы уверены?",
"Default preset restored": "Стандартный пресет восстановлен", "Default preset restored": "Стандартный пресет восстановлен",
"Default template restored": "Стандартный шаблон восстановлен", "Default template restored": "Стандартный шаблон восстановлен",
@@ -2048,11 +2046,11 @@
"prompt_post_processing_merge": "Объединять идущие подряд сообщения с одной ролью", "prompt_post_processing_merge": "Объединять идущие подряд сообщения с одной ролью",
"prompt_post_processing_semi": "Semi-strict (чередовать роли)", "prompt_post_processing_semi": "Semi-strict (чередовать роли)",
"prompt_post_processing_strict": "Strict (чередовать роли, сначала пользователь)", "prompt_post_processing_strict": "Strict (чередовать роли, сначала пользователь)",
"Select Horde models": "Выбрать модель из Horde", "Select Horde models": "Выберите модель из Horde",
"Model ID (optional)": "Идентификатор модели (необязательно)", "Model ID (optional)": "Идентификатор модели (необязательно)",
"Derive context size from backend": "Использовать бэкенд для определения размера контекста", "Derive context size from backend": "Использовать бэкенд для определения размера контекста",
"Rename current preset": "Переименовать пресет", "Rename current preset": "Переименовать пресет",
"No Worlds active. Click here to select.": "Нет активных миров. Нажмите, чтобы выбрать.", "No Worlds active. Click here to select.": "Активных миров нет, ЛКМ для выбора.",
"Title/Memo": "Название", "Title/Memo": "Название",
"Strategy": "Статус", "Strategy": "Статус",
"Position": "Позиция", "Position": "Позиция",
@@ -2171,7 +2169,7 @@
"instruct_derived": "Считывать из метаданных модели (по возможности)", "instruct_derived": "Считывать из метаданных модели (по возможности)",
"Confirm token parsing with": "Чтобы убедиться в правильности выделения токенов, используйте", "Confirm token parsing with": "Чтобы убедиться в правильности выделения токенов, используйте",
"Reasoning Effort": "Рассуждения", "Reasoning Effort": "Рассуждения",
"Constrains effort on reasoning for reasoning models.": "Регулирует объём внутренних рассуждений модели (reasoning), для моделей которые поддерживают эту возможность.\nНа данный момент поддерживаются три значения: Подробные, Обычные, Поверхностные.\nПри менее подробном рассуждении ответ получается быстрее, а также экономятся токены, уходящие на рассуждения.", "Constrains effort on reasoning for reasoning models.": "Регулирует объём внутренних рассуждений модели (reasoning), для моделей, которые поддерживают эту возможность.\nПри менее подробном рассуждении ответ получается быстрее, а также экономятся токены, уходящие на рассуждения.",
"openai_reasoning_effort_low": "Поверхностные", "openai_reasoning_effort_low": "Поверхностные",
"openai_reasoning_effort_medium": "Обычные", "openai_reasoning_effort_medium": "Обычные",
"openai_reasoning_effort_high": "Подробные", "openai_reasoning_effort_high": "Подробные",
@@ -2276,8 +2274,8 @@
"Persona Name Not Set": "У персоны отсутствует имя", "Persona Name Not Set": "У персоны отсутствует имя",
"You must bind a name to this persona before you can set a lorebook.": "Перед привязкой лорбука персоне необходимо присвоить имя.", "You must bind a name to this persona before you can set a lorebook.": "Перед привязкой лорбука персоне необходимо присвоить имя.",
"Default Persona Removed": "Персона по умолчанию снята", "Default Persona Removed": "Персона по умолчанию снята",
"Persona is locked to the current character": "Персона закреплена за этим персонажем", "Persona is locked to the current character": "Персона закреплена за текущим персонажем",
"Persona is locked to the current chat": "Персона закреплена за этим чатом", "Persona is locked to the current chat": "Персона закреплена за текущим чатом",
"characters": "перс.", "characters": "перс.",
"character": "персонаж", "character": "персонаж",
"in this group": "в группе", "in this group": "в группе",
@@ -2338,5 +2336,88 @@
"Reasoning already exists.": "Рассуждения уже присутствуют.", "Reasoning already exists.": "Рассуждения уже присутствуют.",
"Edit Message": "Редактирование", "Edit Message": "Редактирование",
"Status check bypassed": "Проверка статуса отключена", "Status check bypassed": "Проверка статуса отключена",
"Valid": "Работает" "Valid": "Работает",
"Use Group Scoring": "Использовать Group Scoring",
"Only the entries with the most number of key matches will be selected for Inclusion Group filtering": "До групповых фильтров будут допущены только записи с наибольшим кол-вом совпадений",
"Can be used to automatically activate Quick Replies": "Используется для автоматической активации быстрых ответов (Quick Replies)",
"( None )": "(Отсутствует)",
"Tie this entry to specific characters or characters with specific tags": "Привязать запись к опред. персонажам или персонажам с заданными тегами",
"Move Entry to Another Lorebook": "Переместить запись в другой лорбук",
"There are no other lorebooks to move to.": "Некуда перемещать: не найдено других лорбуков.",
"Select Target Lorebook": "Выберите куда переместить",
"Move '${0}' to:": "Переместить '${0}' в:",
"Please select a target lorebook.": "Выберите лорбук, в который будет перемещена запись.",
"Scan depth cannot be negative": "Глубина сканирования не может быть отрицательной",
"Scan depth cannot exceed ${0}": "Глубина сканирования не может превышать ${0}",
"Select your current Reasoning Template": "Выберите текущий Шаблон рассуждений",
"Delete template": "Удалить шаблон",
"Reasoning Template": "Шаблон рассуждений",
"openai_reasoning_effort_auto": "Авто",
"openai_reasoning_effort_minimum": "Минимальные",
"openai_reasoning_effort_maximum": "Максимальные",
"OpenAI-style options: low, medium, high. Minimum and maximum are aliased to low and high. Auto does not send an effort level.": "OpenAI принимает следующее: low (Поверхностные), medium (Обычные), high (Подробные). Minimum (Минимальные) - то же самое, что low. Maximum (Максимальные) - то же самое, что high. При выборе Auto (Авто) значение не отсылается вообще.",
"Allocates a portion of the response length for thinking (low: 10%, medium: 25%, high: 50%). Other options are model-dependent.": "Резервирует часть ответа для рассуждений (Поверхностные: 10% ответа, Обычные: 25%, Подробные: 50%). Остальные значения зависят от конкретной модели.",
"xAI Model": "Модель xAI",
"xAI API Key": "Ключ от API xAI",
"HuggingFace Token": "Токен HuggingFace",
"Endpoint URL": "Адрес эндпоинта",
"Example: https://****.endpoints.huggingface.cloud": "Пример: https://****.endpoints.huggingface.cloud",
"Featherless Model Selection": "Выбор модели из Featherless",
"category": "категория",
"Top": "Топовые",
"All Classes": "Все классы",
"Date Asc": "Дата, возрастание",
"Date Desc": "Дата, убывание",
"Background Image": "Фоновое изображение",
"Delete the background?": "Удалить фон?",
"Tags_as_Folders_desc": "Чтобы тег отображался как папка, его нужно отметить таковым в меню управления тегами. Нажмите сюда, чтобы открыть его.",
"tag_entries": "раз исп.",
"Multiple personas are connected to this character.\nSelect a persona to use for this chat.": "К этому персонажу привязано несколько персон.\nВыберите персону, которую хотите использовать в этом чате.",
"Select Persona": "Выберите персону",
"Completion Object": "Как часть Completion Object",
"Move ${0} to:": "Переместить '${0}' в:",
"Chat Scenario Override": "Перезапись сценария чата",
"Unique to this chat.": "Действует только в рамках текущего чата.",
"All group members will use the following scenario text instead of what is specified in their character cards.": "Все участники группы будут использовать этот сценарий вместо того, который указан в карточке.",
"Checkpoints inherit the scenario override from their parent, and can be changed individually after that.": "Чекпоинты наследуют сценарий родителя, после отделения его можно менять.",
"Delete Tag": "Удалить тег",
"Do you want to delete the tag": "Вы точно хотите удалить тег",
"If you want to merge all references to this tag into another tag, select it below:": "Если хотите заменить ссылки на этот тег на какой-то другой, то выберите из списка:",
"Open Folder (Show all characters even if not selected)": "Открытая папка (показать всех персонажей, включая невыбранных)",
"Closed Folder (Hide all characters unless selected)": "Закрытая папка (скрыть всех персонажей, кроме выбранных)",
"No Folder": "Не папка",
"Show only favorites": "Показать только избранных персонажей",
"Show only groups": "Показать только группы",
"Show only folders": "Показать только папки",
"Manage tags": "Панель управления тегами",
"Show Tag List": "Показать список тегов",
"Clear all filters": "Сбросить все фильтры",
"There are no items to display.": "Отображать абсолютно нечего.",
"Characters and groups hidden by filters or closed folders": "Персонажи и группы скрыты настройками фильтров либо закрытыми папками",
"Otterly empty": "Всё что можно, всё выдрано",
"Here be dragons": "Список настолько очистился, что в него вернулись драконы",
"Kiwibunga": "Настолько пусто, что киви прилетела посидеть",
"Pump-a-Rum": "Пу-пу-пу",
"Croak it": "Только кваканье лягушек и стрёкот сверчков",
"${0} character hidden.": "Персонажей скрыто: ${0}.",
"${0} characters hidden.": "Персонажей скрыто: ${0}.",
"/ page": "/ стр.",
"Context Length": "Размер контекста",
"Added On": "Добавлена",
"Class": "Класс",
"Bulk_edit_characters": "Массовое редактирование персонажей\n\nЛКМ, чтобы выделить либо отменить выделение персонажа\nShift+ЛКМ, чтобы массово выделить либо отменить выделение персонажей\nПКМ, чтобы выбрать действие",
"Bulk select all characters": "Выбрать всех персонажей",
"Duplicate": "Клонировать",
"Next page": "След. страница",
"Previous page": "Пред. страница",
"Group: ${0}": "Группа: ${0}",
"You deleted a character/chat and arrived back here for safety reasons! Pick another character!": "Вы удалили персонажа или чат, и мы из соображений безопасности перенесли вас на эту страницу! Выберите другого персонажа!",
"Group is empty.": "Группа пуста.",
"No characters available": "Персонажей нет",
"Choose what to export": "Выберите, что экспортировать",
"Text Completion Preset": "Пресет для режима Text Completion",
"Update enabled": "Обновить включенные",
"Could not connect to API": "Не удалось подключиться к API",
"Connected to API": "Соединение с API установлено",
"Go back": "Назад"
} }

View File

@@ -411,7 +411,6 @@
"Chat Start": "Початок чату", "Chat Start": "Початок чату",
"Add Chat Start and Example Separator to a list of stopping strings.": "Додайте початок чату та роздільник прикладів до списку рядків зупинки.", "Add Chat Start and Example Separator to a list of stopping strings.": "Додайте початок чату та роздільник прикладів до списку рядків зупинки.",
"Use as Stop Strings": "Використовувати як рядки зупинки", "Use as Stop Strings": "Використовувати як рядки зупинки",
"context_allow_jailbreak": "Включає втечу з в’язниці в кінці підказки, якщо визначено в картці символів ТА «Переважати символ. Втечу з в'язниці'' увімкнено.\nЦЕ НЕ РЕКОМЕНДУЄТЬСЯ ДЛЯ МОДЕЛЕЙ ЗАВЕРШЕННЯ ТЕКСТУ, МОЖЕ ПРИЗВЕСТИ ДО ПОГАНОГО РЕЗУЛЬТАТУ.",
"Allow Jailbreak": "Дозволити втечу з в'язниці", "Allow Jailbreak": "Дозволити втечу з в'язниці",
"Context Order": "Порядок контексту", "Context Order": "Порядок контексту",
"Summary": "Резюме", "Summary": "Резюме",

View File

@@ -411,7 +411,6 @@
"Chat Start": "Bắt đầu Chat", "Chat Start": "Bắt đầu Chat",
"Add Chat Start and Example Separator to a list of stopping strings.": "Thêm Bắt đầu trò chuyện và Dấu phân cách ví dụ vào danh sách các chuỗi dừng.", "Add Chat Start and Example Separator to a list of stopping strings.": "Thêm Bắt đầu trò chuyện và Dấu phân cách ví dụ vào danh sách các chuỗi dừng.",
"Use as Stop Strings": "Sử dụng như chuỗi dừng", "Use as Stop Strings": "Sử dụng như chuỗi dừng",
"context_allow_jailbreak": "Bao gồm Bẻ khóa ở cuối Prompt, nếu được xác định trong thẻ ký tự VÀ ''Thích Char. Bẻ khóa'' được bật.\nĐIỀU NÀY KHÔNG ĐƯỢC KHUYẾN NGHỊ CHO CÁC MÔ HÌNH HOÀN THÀNH VĂN BẢN, CÓ THỂ DẪN ĐẾN ĐẦU RA XẤU.",
"Allow Jailbreak": "Cho phép bẻ khóa", "Allow Jailbreak": "Cho phép bẻ khóa",
"Context Order": "Thứ tự bối cảnh", "Context Order": "Thứ tự bối cảnh",
"Summary": "Bản tóm tắt", "Summary": "Bản tóm tắt",

View File

@@ -504,7 +504,6 @@
"Add Character and User names to a list of stopping strings.": "将角色和用户名添加到停止字符串列表中。", "Add Character and User names to a list of stopping strings.": "将角色和用户名添加到停止字符串列表中。",
"Names as Stop Strings": "名称作为终止字符串", "Names as Stop Strings": "名称作为终止字符串",
"context_allow_post_history_instructions": "如果在角色卡中定义并且启用了“首选角色卡说明”,则在提示末尾包含后历史说明。\n不建议在文本补全模型中使用此功能否则会导致输出错误。", "context_allow_post_history_instructions": "如果在角色卡中定义并且启用了“首选角色卡说明”,则在提示末尾包含后历史说明。\n不建议在文本补全模型中使用此功能否则会导致输出错误。",
"Allow Post-History Instructions": "允许后历史说明",
"Instruct Template": "指导模板", "Instruct Template": "指导模板",
"instruct_derived": "如果可能,从模型元数据中获取", "instruct_derived": "如果可能,从模型元数据中获取",
"instruct_bind_to_context": "如果启用,上下文模板将根据所选的指导模板名称或偏好自动选择。", "instruct_bind_to_context": "如果启用,上下文模板将根据所选的指导模板名称或偏好自动选择。",
@@ -1358,7 +1357,7 @@
"Image Captioning": "图像描述", "Image Captioning": "图像描述",
"Source": "来源", "Source": "来源",
"Local": "本地", "Local": "本地",
"Multimodal (OpenAI / Anthropic / llama / Google)": "多模OpenAI / Anthropic / llama / Google", "Multimodal (OpenAI / Anthropic / llama / Google)": "多模OpenAI / Anthropic / llama / Google",
"Extras": "更多", "Extras": "更多",
"Horde": "Horde", "Horde": "Horde",
"API": "API", "API": "API",
@@ -1588,8 +1587,8 @@
"sd_function_tool_txt": "Use function tool", "sd_function_tool_txt": "Use function tool",
"sd_interactive_mode": "发送消息时自动生成图像,例如“给我发一张猫的照片”。", "sd_interactive_mode": "发送消息时自动生成图像,例如“给我发一张猫的照片”。",
"sd_interactive_mode_txt": "交互模式", "sd_interactive_mode_txt": "交互模式",
"sd_multimodal_captioning": "使用多模字幕根据用户和角色的头像生成提示词。", "sd_multimodal_captioning": "使用多模字幕根据用户和角色的头像生成提示词。",
"sd_multimodal_captioning_txt": "使用多模字幕来描绘肖像", "sd_multimodal_captioning_txt": "使用多模字幕来描绘肖像",
"sd_free_extend": "使用当前选择的 LLM 自动扩展自由模式主题提示(不是肖像或背景)。", "sd_free_extend": "使用当前选择的 LLM 自动扩展自由模式主题提示(不是肖像或背景)。",
"sd_free_extend_txt": "延长自由模式提示", "sd_free_extend_txt": "延长自由模式提示",
"sd_free_extend_small": "(交互/命令)", "sd_free_extend_small": "(交互/命令)",
@@ -2109,5 +2108,25 @@
"Title/Memo": "标题(备忘)", "Title/Memo": "标题(备忘)",
"Strategy": "触发策略", "Strategy": "触发策略",
"Position": "插入位置", "Position": "插入位置",
"Trigger %": "触发概率%" "Trigger %": "触发概率%",
"Generate Caption": "生成图片描述",
"(DEPRECATED)": "(已弃用)",
"[Currently loaded]": "[当前加载]",
"Change Persona Image": "更改角色图片",
"Delete Persona": "删除角色",
"Duplicate Persona": "复制角色",
"Enter a name for this persona:": "输入角色名",
"Enable web search": "启用联网搜索",
"Current Persona": "当前角色",
"Global Settings": "全局设置",
"Select a model": "选择模型",
"Thinking...": "思考中",
"Valid": "有效",
"Rename Persona": "重命名角色",
"Sort By: Name (Z-A)": "排序: 名称Z-A",
"Sort By: Name (A-Z)": "排序: 名称A-Z",
"Sort By: Date (Oldest First)": "排序: 日期(从最远到最新)",
"Sort By: Date (Newest First)": "排序: 日期(从最新到最远)",
"Set the reasoning block of a message. Returns the reasoning block content.": "设置消息的推理块。返回推理块内容。",
"Select providers. No selection = all providers.": "选择服务商。未选择 = 所有服务商。"
} }

View File

@@ -412,7 +412,6 @@
"Chat Start": "聊天開始符號", "Chat Start": "聊天開始符號",
"Add Chat Start and Example Separator to a list of stopping strings.": "將聊天開始和範例分隔符號加入終止字串中。", "Add Chat Start and Example Separator to a list of stopping strings.": "將聊天開始和範例分隔符號加入終止字串中。",
"Use as Stop Strings": "用作停止字串", "Use as Stop Strings": "用作停止字串",
"context_allow_jailbreak": "如果在角色卡中定義了越獄,且啟用了「角色卡越獄優先」,則會在提示詞的結尾加入越獄內容。\n這不建議用於文字完成模型因為可能導致不良的輸出結果。",
"Allow Jailbreak": "允許越獄", "Allow Jailbreak": "允許越獄",
"Context Order": "上下文順序", "Context Order": "上下文順序",
"Summary": "摘要", "Summary": "摘要",
@@ -1555,7 +1554,6 @@
"All": "全部", "All": "全部",
"Allow fallback models": "允許回退模型", "Allow fallback models": "允許回退模型",
"Allow fallback providers": "允許回退供應商", "Allow fallback providers": "允許回退供應商",
"Allow Post-History Instructions": "允許聊天歷史後指示",
"Allow reverse proxy": "允許反向代理", "Allow reverse proxy": "允許反向代理",
"Alternate Greeting #": "備選問候語 #", "Alternate Greeting #": "備選問候語 #",
"alternate_greetings_hint_1": "點選", "alternate_greetings_hint_1": "點選",

View File

@@ -50,6 +50,7 @@ import {
importWorldInfo, importWorldInfo,
wi_anchor_position, wi_anchor_position,
world_info_include_names, world_info_include_names,
initWorldInfo,
} from './scripts/world-info.js'; } from './scripts/world-info.js';
import { import {
@@ -142,6 +143,7 @@ import {
getHordeModels, getHordeModels,
adjustHordeGenerationParams, adjustHordeGenerationParams,
MIN_LENGTH, MIN_LENGTH,
initHorde,
} from './scripts/horde.js'; } from './scripts/horde.js';
import { import {
@@ -174,6 +176,9 @@ import {
saveBase64AsFile, saveBase64AsFile,
uuidv4, uuidv4,
equalsIgnoreCaseAndAccents, equalsIgnoreCaseAndAccents,
localizePagination,
renderPaginationDropdown,
paginationDropdownChangeHandler,
} from './scripts/utils.js'; } from './scripts/utils.js';
import { debounce_timeout, IGNORE_SYMBOL } from './scripts/constants.js'; import { debounce_timeout, IGNORE_SYMBOL } from './scripts/constants.js';
@@ -651,7 +656,7 @@ export const extension_prompt_roles = {
ASSISTANT: 2, ASSISTANT: 2,
}; };
export const MAX_INJECTION_DEPTH = 1000; export const MAX_INJECTION_DEPTH = 10000;
const SAFETY_CHAT = [ const SAFETY_CHAT = [
{ {
@@ -992,6 +997,8 @@ async function firstLoadInit() {
initBackgrounds(); initBackgrounds();
initAuthorsNote(); initAuthorsNote();
await initPersonas(); await initPersonas();
initWorldInfo();
initHorde();
initRossMods(); initRossMods();
initStats(); initStats();
initCfg(); initCfg();
@@ -1421,30 +1428,26 @@ function getBackBlock() {
return template; return template;
} }
function getEmptyBlock() { async function getEmptyBlock() {
const icons = ['fa-dragon', 'fa-otter', 'fa-kiwi-bird', 'fa-crow', 'fa-frog']; const icons = ['fa-dragon', 'fa-otter', 'fa-kiwi-bird', 'fa-crow', 'fa-frog'];
const texts = ['Here be dragons', 'Otterly empty', 'Kiwibunga', 'Pump-a-Rum', 'Croak it']; const texts = [t`Here be dragons`, t`Otterly empty`, t`Kiwibunga`, t`Pump-a-Rum`, t`Croak it`];
const roll = new Date().getMinutes() % icons.length; const roll = new Date().getMinutes() % icons.length;
const emptyBlock = ` const params = {
<div class="text_block empty_block"> text: texts[roll],
<i class="fa-solid ${icons[roll]} fa-4x"></i> icon: icons[roll],
<h1>${texts[roll]}</h1> };
<p>There are no items to display.</p> const emptyBlock = await renderTemplateAsync('emptyBlock', params);
</div>`;
return $(emptyBlock); return $(emptyBlock);
} }
/** /**
* @param {number} hidden Number of hidden characters * @param {number} hidden Number of hidden characters
*/ */
function getHiddenBlock(hidden) { async function getHiddenBlock(hidden) {
const hiddenBlock = ` const params = {
<div class="text_block hidden_block"> text: (hidden > 1 ? t`${hidden} characters hidden.` : t`${hidden} character hidden.`),
<small> };
<p>${hidden} ${hidden > 1 ? 'characters' : 'character'} hidden.</p> const hiddenBlock = await renderTemplateAsync('hiddenBlock', params);
<div class="fa-solid fa-circle-info opacity50p" data-i18n="[title]Characters and groups hidden by filters or closed folders" title="Characters and groups hidden by filters or closed folders"></div>
</small>
</div>`;
return $(hiddenBlock); return $(hiddenBlock);
} }
@@ -1524,10 +1527,11 @@ export async function printCharacters(fullRefresh = false) {
const entities = getEntitiesList({ doFilter: true }); const entities = getEntitiesList({ doFilter: true });
const pageSize = Number(accountStorage.getItem(storageKey)) || per_page_default;
const sizeChangerOptions = [10, 25, 50, 100, 250, 500, 1000];
$('#rm_print_characters_pagination').pagination({ $('#rm_print_characters_pagination').pagination({
dataSource: entities, dataSource: entities,
pageSize: Number(accountStorage.getItem(storageKey)) || per_page_default, pageSize,
sizeChangerOptions: [10, 25, 50, 100, 250, 500, 1000],
pageRange: 1, pageRange: 1,
pageNumber: saveCharactersPage || 1, pageNumber: saveCharactersPage || 1,
position: 'top', position: 'top',
@@ -1536,14 +1540,16 @@ export async function printCharacters(fullRefresh = false) {
prevText: '<', prevText: '<',
nextText: '>', nextText: '>',
formatNavigator: PAGINATION_TEMPLATE, formatNavigator: PAGINATION_TEMPLATE,
formatSizeChanger: renderPaginationDropdown(pageSize, sizeChangerOptions),
showNavigator: true, showNavigator: true,
callback: function (/** @type {Entity[]} */ data) { callback: async function (/** @type {Entity[]} */ data) {
$(listId).empty(); $(listId).empty();
if (power_user.bogus_folders && isBogusFolderOpen()) { if (power_user.bogus_folders && isBogusFolderOpen()) {
$(listId).append(getBackBlock()); $(listId).append(getBackBlock());
} }
if (!data.length) { if (!data.length) {
$(listId).append(getEmptyBlock()); const emptyBlock = await getEmptyBlock();
$(listId).append(emptyBlock);
} }
let displayCount = 0; let displayCount = 0;
for (const i of data) { for (const i of data) {
@@ -1564,13 +1570,16 @@ export async function printCharacters(fullRefresh = false) {
const hidden = (characters.length + groups.length) - displayCount; const hidden = (characters.length + groups.length) - displayCount;
if (hidden > 0 && entitiesFilter.hasAnyFilter()) { if (hidden > 0 && entitiesFilter.hasAnyFilter()) {
$(listId).append(getHiddenBlock(hidden)); const hiddenBlock = await getHiddenBlock(hidden);
$(listId).append(hiddenBlock);
} }
localizePagination($('#rm_print_characters_pagination'));
eventSource.emit(event_types.CHARACTER_PAGE_LOADED); eventSource.emit(event_types.CHARACTER_PAGE_LOADED);
}, },
afterSizeSelectorChange: function (e) { afterSizeSelectorChange: function (e, size) {
accountStorage.setItem(storageKey, e.target.value); accountStorage.setItem(storageKey, e.target.value);
paginationDropdownChangeHandler(e, size);
}, },
afterPaging: function (e) { afterPaging: function (e) {
saveCharactersPage = e; saveCharactersPage = e;
@@ -2751,6 +2760,7 @@ export function substituteParams(content, _name1, _name2, _original, _group, _re
environment.charVersion = fields.version || ''; environment.charVersion = fields.version || '';
environment.char_version = fields.version || ''; environment.char_version = fields.version || '';
environment.charDepthPrompt = fields.charDepthPrompt || ''; environment.charDepthPrompt = fields.charDepthPrompt || '';
environment.creatorNotes = fields.creatorNotes || '';
} }
// Must be substituted last so that they're replaced inside {{description}} // Must be substituted last so that they're replaced inside {{description}}
@@ -3046,6 +3056,20 @@ export async function getExtensionPromptByName(moduleName) {
return substituteParams(prompt.value); return substituteParams(prompt.value);
} }
/**
* Gets the maximum depth of extension prompts.
* @returns {number} Maximum depth of extension prompts
*/
export function getExtensionPromptMaxDepth() {
return MAX_INJECTION_DEPTH;
/*
const prompts = Object.values(extension_prompts);
const maxDepth = Math.max(...prompts.map(x => x.depth ?? 0));
// Clamp to 1 <= depth <= MAX_INJECTION_DEPTH
return Math.max(Math.min(maxDepth, MAX_INJECTION_DEPTH), 1);
*/
}
/** /**
* Returns the extension prompt for the given position, depth, and role. * Returns the extension prompt for the given position, depth, and role.
* If multiple prompts are found, they are joined with a separator. * If multiple prompts are found, they are joined with a separator.
@@ -3115,6 +3139,7 @@ export function baseChatReplace(value, name1, name2) {
* @property {string} jailbreak Jailbreak instructions * @property {string} jailbreak Jailbreak instructions
* @property {string} version Character version * @property {string} version Character version
* @property {string} charDepthPrompt Character depth note * @property {string} charDepthPrompt Character depth note
* @property {string} creatorNotes Character creator notes
* @returns {CharacterCardFields} Character card fields * @returns {CharacterCardFields} Character card fields
*/ */
export function getCharacterCardFields({ chid = null } = {}) { export function getCharacterCardFields({ chid = null } = {}) {
@@ -3130,6 +3155,7 @@ export function getCharacterCardFields({ chid = null } = {}) {
jailbreak: '', jailbreak: '',
version: '', version: '',
charDepthPrompt: '', charDepthPrompt: '',
creatorNotes: '',
}; };
result.persona = baseChatReplace(power_user.persona_description?.trim(), name1, name2); result.persona = baseChatReplace(power_user.persona_description?.trim(), name1, name2);
@@ -3148,6 +3174,7 @@ export function getCharacterCardFields({ chid = null } = {}) {
result.jailbreak = power_user.prefer_character_jailbreak ? baseChatReplace(character.data?.post_history_instructions?.trim(), name1, name2) : ''; result.jailbreak = power_user.prefer_character_jailbreak ? baseChatReplace(character.data?.post_history_instructions?.trim(), name1, name2) : '';
result.version = character.data?.character_version ?? ''; result.version = character.data?.character_version ?? '';
result.charDepthPrompt = baseChatReplace(character.data?.extensions?.depth_prompt?.prompt?.trim(), name1, name2); result.charDepthPrompt = baseChatReplace(character.data?.extensions?.depth_prompt?.prompt?.trim(), name1, name2);
result.creatorNotes = baseChatReplace(character.data?.creator_notes?.trim(), name1, name2);
if (selected_group) { if (selected_group) {
const groupCards = getGroupCharacterCards(selected_group, Number(currentChid)); const groupCards = getGroupCharacterCards(selected_group, Number(currentChid));
@@ -3975,11 +4002,14 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
system, system,
jailbreak, jailbreak,
charDepthPrompt, charDepthPrompt,
creatorNotes,
} = getCharacterCardFields(); } = getCharacterCardFields();
if (main_api !== 'openai') { if (main_api !== 'openai') {
if (power_user.sysprompt.enabled) { if (power_user.sysprompt.enabled) {
system = power_user.prefer_character_prompt && system ? system : baseChatReplace(power_user.sysprompt.content, name1, name2); system = power_user.prefer_character_prompt && system
? substituteParams(system, name1, name2, (power_user.sysprompt.content ?? ''))
: baseChatReplace(power_user.sysprompt.content, name1, name2);
system = isInstruct ? formatInstructModeSystemPrompt(substituteParams(system, name1, name2, power_user.sysprompt.content)) : system; system = isInstruct ? formatInstructModeSystemPrompt(substituteParams(system, name1, name2, power_user.sysprompt.content)) : system;
} else { } else {
// Nullify if it's not enabled // Nullify if it's not enabled
@@ -4129,7 +4159,15 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
// Make quiet prompt available for WIAN // Make quiet prompt available for WIAN
setExtensionPrompt('QUIET_PROMPT', quiet_prompt || '', extension_prompt_types.IN_PROMPT, 0, true); setExtensionPrompt('QUIET_PROMPT', quiet_prompt || '', extension_prompt_types.IN_PROMPT, 0, true);
const chatForWI = coreChat.map(x => world_info_include_names ? `${x.name}: ${x.mes}` : x.mes).reverse(); const chatForWI = coreChat.map(x => world_info_include_names ? `${x.name}: ${x.mes}` : x.mes).reverse();
const { worldInfoString, worldInfoBefore, worldInfoAfter, worldInfoExamples, worldInfoDepth } = await getWorldInfoPrompt(chatForWI, this_max_context, dryRun); const globalScanData = {
personaDescription: persona,
characterDescription: description,
characterPersonality: personality,
characterDepthPrompt: charDepthPrompt,
scenario: scenario,
creatorNotes: creatorNotes,
};
const { worldInfoString, worldInfoBefore, worldInfoAfter, worldInfoExamples, worldInfoDepth } = await getWorldInfoPrompt(chatForWI, this_max_context, dryRun, globalScanData);
setExtensionPrompt('QUIET_PROMPT', '', extension_prompt_types.IN_PROMPT, 0, true); setExtensionPrompt('QUIET_PROMPT', '', extension_prompt_types.IN_PROMPT, 0, true);
// Add message example WI // Add message example WI
@@ -4178,17 +4216,20 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
injectedIndices = await doChatInject(coreChat, isContinue); injectedIndices = await doChatInject(coreChat, isContinue);
} }
// Insert character jailbreak as the last user message (if exists, allowed, preferred, and not using Chat Completion) if (main_api !== 'openai' && power_user.sysprompt.enabled) {
if (power_user.context.allow_jailbreak && power_user.prefer_character_jailbreak && main_api !== 'openai' && jailbreak) { jailbreak = power_user.prefer_character_jailbreak && jailbreak
// Set "original" explicity to empty string since there's no original ? substituteParams(jailbreak, name1, name2, (power_user.sysprompt.post_history ?? ''))
jailbreak = substituteParams(jailbreak, name1, name2, ''); : baseChatReplace(power_user.sysprompt.post_history, name1, name2);
// When continuing generation of previous output, last user message precedes the message to continue // Only inject the jb if there is one
if (isContinue) { if (jailbreak) {
coreChat.splice(coreChat.length - 1, 0, { mes: jailbreak, is_user: true }); // When continuing generation of previous output, last user message precedes the message to continue
} if (isContinue) {
else { coreChat.splice(coreChat.length - 1, 0, { mes: jailbreak, is_user: true });
coreChat.push({ mes: jailbreak, is_user: true }); }
else {
coreChat.push({ mes: jailbreak, is_user: true });
}
} }
} }
@@ -4221,12 +4262,20 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
// Do not suffix the message for continuation // Do not suffix the message for continuation
if (i === 0 && isContinue) { if (i === 0 && isContinue) {
// Pick something that's very unlikely to be in a message
const FORMAT_TOKEN = '\u0000\ufffc\u0000\ufffd';
if (isInstruct) { if (isInstruct) {
const originalMessage = String(coreChat[j].mes ?? '');
coreChat[j].mes = originalMessage.replaceAll(FORMAT_TOKEN, '') + FORMAT_TOKEN;
// Reformat with the last output sequence (if any) // Reformat with the last output sequence (if any)
chat2[i] = formatMessageHistoryItem(coreChat[j], isInstruct, force_output_sequence.LAST); chat2[i] = formatMessageHistoryItem(coreChat[j], isInstruct, force_output_sequence.LAST);
coreChat[j].mes = originalMessage;
} }
chat2[i] = chat2[i].slice(0, chat2[i].lastIndexOf(coreChat[j].mes) + coreChat[j].mes.length); chat2[i] = chat2[i].includes(FORMAT_TOKEN)
? chat2[i].slice(0, chat2[i].lastIndexOf(FORMAT_TOKEN))
: chat2[i].slice(0, chat2[i].lastIndexOf(coreChat[j].mes) + coreChat[j].mes.length);
continue_mag = coreChat[j].mes; continue_mag = coreChat[j].mes;
} }
@@ -4840,6 +4889,8 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
userPersona: (power_user.persona_description_position == persona_description_positions.IN_PROMPT ? (persona || '') : ''), userPersona: (power_user.persona_description_position == persona_description_positions.IN_PROMPT ? (persona || '') : ''),
tokenizer: getFriendlyTokenizerName(main_api).tokenizerName || '', tokenizer: getFriendlyTokenizerName(main_api).tokenizerName || '',
presetName: getPresetManager()?.getSelectedPresetName() || '', presetName: getPresetManager()?.getSelectedPresetName() || '',
messagesCount: main_api !== 'openai' ? mesSend.length : oaiMessages.length,
examplesCount: main_api !== 'openai' ? (pinExmString ? mesExamplesArray.length : count_exm_add) : oaiMessageExamples.length,
}; };
//console.log(additionalPromptStuff); //console.log(additionalPromptStuff);
@@ -5099,7 +5150,8 @@ async function doChatInject(messages, isContinue) {
let totalInsertedMessages = 0; let totalInsertedMessages = 0;
messages.reverse(); messages.reverse();
for (let i = 0; i <= MAX_INJECTION_DEPTH; i++) { const maxDepth = getExtensionPromptMaxDepth();
for (let i = 0; i <= maxDepth; i++) {
// Order of priority (most important go lower) // Order of priority (most important go lower)
const roles = [extension_prompt_roles.SYSTEM, extension_prompt_roles.USER, extension_prompt_roles.ASSISTANT]; const roles = [extension_prompt_roles.SYSTEM, extension_prompt_roles.USER, extension_prompt_roles.ASSISTANT];
const names = { const names = {
@@ -5522,6 +5574,8 @@ export async function itemizedParams(itemizedPrompts, thisPromptSet, incomingMes
modelUsed: chat[incomingMesId]?.extra?.model, modelUsed: chat[incomingMesId]?.extra?.model,
apiUsed: chat[incomingMesId]?.extra?.api, apiUsed: chat[incomingMesId]?.extra?.api,
presetName: itemizedPrompts[thisPromptSet].presetName || t`(Unknown)`, presetName: itemizedPrompts[thisPromptSet].presetName || t`(Unknown)`,
messagesCount: String(itemizedPrompts[thisPromptSet].messagesCount ?? ''),
examplesCount: String(itemizedPrompts[thisPromptSet].examplesCount ?? ''),
}; };
const getFriendlyName = (value) => $(`#rm_api_block select option[value="${value}"]`).first().text() || value; const getFriendlyName = (value) => $(`#rm_api_block select option[value="${value}"]`).first().text() || value;
@@ -6940,15 +6994,23 @@ export async function saveChat({ chatName, withMetadata, mesId, force = false }
throw new Error(result.statusText); throw new Error(result.statusText);
} }
const forceSaveConfirmed = await Popup.show.confirm( const popupResult = await Popup.show.input(
t`ERROR: Chat integrity check failed.`, t`ERROR: Chat integrity check failed while saving the file.`,
t`Continuing the operation may result in data loss. Would you like to overwrite the chat file anyway? Pressing "NO" will cancel the save operation.`, t`<p>After you click OK, the page will be reloaded to prevent data corruption.</p>
{ okButton: t`Yes, overwrite`, cancelButton: t`No, cancel` }, <p>To confirm an overwrite (and potentially <b>LOSE YOUR DATA</b>), enter <code>OVERWRITE</code> (in all caps) in the box below before clicking OK.</p>`,
) === POPUP_RESULT.AFFIRMATIVE; '',
{ okButton: 'OK', cancelButton: false },
);
if (forceSaveConfirmed) { const forceSaveConfirmed = popupResult === 'OVERWRITE';
await saveChat({ chatName, withMetadata, mesId, force: true });
if (!forceSaveConfirmed) {
console.warn('Chat integrity check failed, and user did not confirm the overwrite. Reloading the page.');
window.location.reload();
return;
} }
await saveChat({ chatName, withMetadata, mesId, force: true });
} catch (error) { } catch (error) {
console.error(error); console.error(error);
toastr.error(t`Check the server connection and reload the page to prevent data loss.`, t`Chat could not be saved`); toastr.error(t`Check the server connection and reload the page to prevent data loss.`, t`Chat could not be saved`);
@@ -8375,15 +8437,15 @@ export function callPopup(text, type, inputValue = '', { okButton, rows, wide, w
function getOkButtonText() { function getOkButtonText() {
if (['text', 'char_not_selected'].includes(popup_type)) { if (['text', 'char_not_selected'].includes(popup_type)) {
$dialoguePopupCancel.css('display', 'none'); $dialoguePopupCancel.css('display', 'none');
return okButton ?? 'Ok'; return okButton ?? t`Ok`;
} else if (['delete_extension'].includes(popup_type)) { } else if (['delete_extension'].includes(popup_type)) {
return okButton ?? 'Ok'; return okButton ?? t`Ok`;
} else if (['new_chat', 'confirm'].includes(popup_type)) { } else if (['new_chat', 'confirm'].includes(popup_type)) {
return okButton ?? 'Yes'; return okButton ?? t`Yes`;
} else if (['input'].includes(popup_type)) { } else if (['input'].includes(popup_type)) {
return okButton ?? t`Save`; return okButton ?? t`Save`;
} }
return okButton ?? 'Delete'; return okButton ?? t`Delete`;
} }
dialogueCloseStop = true; dialogueCloseStop = true;
@@ -9089,7 +9151,7 @@ function formatSwipeCounter(current, total) {
* @param {string} [params.source] The source of the swipe event. * @param {string} [params.source] The source of the swipe event.
* @param {boolean} [params.repeated] Is the swipe event repeated. * @param {boolean} [params.repeated] Is the swipe event repeated.
*/ */
function swipe_left(_event, { source, repeated } = {}) { export function swipe_left(_event, { source, repeated } = {}) {
if (chat.length - 1 === Number(this_edit_mes_id)) { if (chat.length - 1 === Number(this_edit_mes_id)) {
closeMessageEditor(); closeMessageEditor();
} }
@@ -9237,7 +9299,7 @@ function swipe_left(_event, { source, repeated } = {}) {
* @param {string} [params.source] The source of the swipe event. * @param {string} [params.source] The source of the swipe event.
* @param {boolean} [params.repeated] Is the swipe event repeated. * @param {boolean} [params.repeated] Is the swipe event repeated.
*/ */
function swipe_right(_event, { source, repeated } = {}) { export function swipe_right(_event, { source, repeated } = {}) {
if (chat.length - 1 === Number(this_edit_mes_id)) { if (chat.length - 1 === Number(this_edit_mes_id)) {
closeMessageEditor(); closeMessageEditor();
} }
@@ -11832,8 +11894,8 @@ jQuery(async function () {
return; return;
} }
const drawer = $(this).closest('.inline-drawer'); const drawer = $(this).closest('.inline-drawer');
const icon = drawer.find('.inline-drawer-icon'); const icon = drawer.find('>.inline-drawer-header .inline-drawer-icon');
const drawerContent = drawer.find('.inline-drawer-content'); const drawerContent = drawer.find('>.inline-drawer-content');
icon.toggleClass('down up'); icon.toggleClass('down up');
icon.toggleClass('fa-circle-chevron-down fa-circle-chevron-up'); icon.toggleClass('fa-circle-chevron-down fa-circle-chevron-up');
drawerContent.stop().slideToggle({ drawerContent.stop().slideToggle({

View File

@@ -409,6 +409,7 @@ function RA_autoconnect(PrevApi) {
|| (secret_state[SECRET_KEYS.ZEROONEAI] && oai_settings.chat_completion_source == chat_completion_sources.ZEROONEAI) || (secret_state[SECRET_KEYS.ZEROONEAI] && oai_settings.chat_completion_source == chat_completion_sources.ZEROONEAI)
|| (secret_state[SECRET_KEYS.NANOGPT] && oai_settings.chat_completion_source == chat_completion_sources.NANOGPT) || (secret_state[SECRET_KEYS.NANOGPT] && oai_settings.chat_completion_source == chat_completion_sources.NANOGPT)
|| (secret_state[SECRET_KEYS.DEEPSEEK] && oai_settings.chat_completion_source == chat_completion_sources.DEEPSEEK) || (secret_state[SECRET_KEYS.DEEPSEEK] && oai_settings.chat_completion_source == chat_completion_sources.DEEPSEEK)
|| (secret_state[SECRET_KEYS.XAI] && oai_settings.chat_completion_source == chat_completion_sources.XAI)
|| (isValidUrl(oai_settings.custom_url) && oai_settings.chat_completion_source == chat_completion_sources.CUSTOM) || (isValidUrl(oai_settings.custom_url) && oai_settings.chat_completion_source == chat_completion_sources.CUSTOM)
) { ) {
$('#api_button_openai').trigger('click'); $('#api_button_openai').trigger('click');
@@ -1047,7 +1048,7 @@ export function initRossMods() {
//Enter to send when send_textarea in focus //Enter to send when send_textarea in focus
if (document.activeElement == hotkeyTargets['send_textarea']) { if (document.activeElement == hotkeyTargets['send_textarea']) {
const sendOnEnter = shouldSendOnEnter(); const sendOnEnter = shouldSendOnEnter();
if (!event.shiftKey && !event.ctrlKey && !event.altKey && event.key == 'Enter' && sendOnEnter) { if (!event.isComposing && !event.shiftKey && !event.ctrlKey && !event.altKey && event.key == 'Enter' && sendOnEnter) {
event.preventDefault(); event.preventDefault();
sendTextareaMessage(); sendTextareaMessage();
return; return;
@@ -1119,7 +1120,7 @@ export function initRossMods() {
const result = await Popup.show.confirm('Regenerate Message', 'Are you sure you want to regenerate the latest message?', { const result = await Popup.show.confirm('Regenerate Message', 'Are you sure you want to regenerate the latest message?', {
customInputs: [{ id: 'regenerateWithCtrlEnter', label: 'Don\'t ask again' }], customInputs: [{ id: 'regenerateWithCtrlEnter', label: 'Don\'t ask again' }],
onClose: (popup) => { onClose: (popup) => {
regenerateWithCtrlEnter = popup.inputResults.get('regenerateWithCtrlEnter') ?? false; regenerateWithCtrlEnter = Boolean(popup.inputResults.get('regenerateWithCtrlEnter') ?? false);
}, },
}); });
if (!result) { if (!result) {

View File

@@ -6,6 +6,7 @@ import { SlashCommand } from './slash-commands/SlashCommand.js';
import { SlashCommandParser } from './slash-commands/SlashCommandParser.js'; import { SlashCommandParser } from './slash-commands/SlashCommandParser.js';
import { flashHighlight, stringFormat } from './utils.js'; import { flashHighlight, stringFormat } from './utils.js';
import { t } from './i18n.js'; import { t } from './i18n.js';
import { Popup } from './popup.js';
const BG_METADATA_KEY = 'custom_background'; const BG_METADATA_KEY = 'custom_background';
const LIST_METADATA_KEY = 'chat_backgrounds'; const LIST_METADATA_KEY = 'chat_backgrounds';
@@ -291,7 +292,7 @@ async function onDeleteBackgroundClick(e) {
const bgToDelete = $(this).closest('.bg_example'); const bgToDelete = $(this).closest('.bg_example');
const url = bgToDelete.data('url'); const url = bgToDelete.data('url');
const isCustom = bgToDelete.attr('custom') === 'true'; const isCustom = bgToDelete.attr('custom') === 'true';
const confirm = await callPopup('<h3>Delete the background?</h3>', 'confirm'); const confirm = await Popup.show.confirm(t`Delete the background?`, null);
const bg = bgToDelete.attr('bgfile'); const bg = bgToDelete.attr('bgfile');
if (confirm) { if (confirm) {

View File

@@ -33,6 +33,12 @@
* @property {number} role - The specific function or purpose of the extension. * @property {number} role - The specific function or purpose of the extension.
* @property {boolean} vectorized - Indicates if the extension is optimized for vectorized processing. * @property {boolean} vectorized - Indicates if the extension is optimized for vectorized processing.
* @property {number} display_index - The order in which the extension should be displayed for user interfaces. * @property {number} display_index - The order in which the extension should be displayed for user interfaces.
* @property {boolean} match_persona_description - Wether to match against the persona description.
* @property {boolean} match_character_description - Wether to match against the persona description.
* @property {boolean} match_character_personality - Wether to match against the character personality.
* @property {boolean} match_character_depth_prompt - Wether to match against the character depth prompt.
* @property {boolean} match_scenario - Wether to match against the character scenario.
* @property {boolean} match_creator_notes - Wether to match against the character creator notes.
*/ */
/** /**

View File

@@ -74,6 +74,11 @@ const hash_derivations = {
'b6835114b7303ddd78919a82e4d9f7d8c26ed0d7dfc36beeb12d524f6144eab1': 'b6835114b7303ddd78919a82e4d9f7d8c26ed0d7dfc36beeb12d524f6144eab1':
'DeepSeek-V2.5' 'DeepSeek-V2.5'
, ,
// THUDM-GLM 4
'854b703e44ca06bdb196cc471c728d15dbab61e744fe6cdce980086b61646ed1':
'GLM-4'
,
}; };
const substr_derivations = { const substr_derivations = {

View File

@@ -43,10 +43,12 @@ import EventSourceStream from './sse-stream.js';
* @property {boolean?} [stream=false] - Whether to stream the response * @property {boolean?} [stream=false] - Whether to stream the response
* @property {ChatCompletionMessage[]} messages - Array of chat messages * @property {ChatCompletionMessage[]} messages - Array of chat messages
* @property {string} [model] - Optional model name to use for completion * @property {string} [model] - Optional model name to use for completion
* @property {string} chat_completion_source - Source provider for chat completion * @property {string} chat_completion_source - Source provider
* @property {number} max_tokens - Maximum number of tokens to generate * @property {number} max_tokens - Maximum number of tokens to generate
* @property {number} [temperature] - Optional temperature parameter for response randomness * @property {number} [temperature] - Optional temperature parameter for response randomness
* @property {string} [custom_url] - Optional custom URL for chat completion * @property {string} [custom_url] - Optional custom URL
* @property {string} [reverse_proxy] - Optional reverse proxy URL
* @property {string} [proxy_password] - Optional proxy password
*/ */
/** @typedef {Record<string, any> & ChatCompletionPayloadBase} ChatCompletionPayload */ /** @typedef {Record<string, any> & ChatCompletionPayloadBase} ChatCompletionPayload */
@@ -80,7 +82,6 @@ export class TextCompletionService {
*/ */
static createRequestData({ stream = false, prompt, max_tokens, model, api_type, api_server, temperature, min_p, ...props }) { static createRequestData({ stream = false, prompt, max_tokens, model, api_type, api_server, temperature, min_p, ...props }) {
const payload = { const payload = {
...props,
stream, stream,
prompt, prompt,
max_tokens, max_tokens,
@@ -90,6 +91,7 @@ export class TextCompletionService {
api_server: api_server ?? getTextGenServer(api_type), api_server: api_server ?? getTextGenServer(api_type),
temperature, temperature,
min_p, min_p,
...props,
}; };
// Remove undefined values to avoid API errors // Remove undefined values to avoid API errors
@@ -387,9 +389,8 @@ export class ChatCompletionService {
* @param {ChatCompletionPayload} custom * @param {ChatCompletionPayload} custom
* @returns {ChatCompletionPayload} * @returns {ChatCompletionPayload}
*/ */
static createRequestData({ stream = false, messages, model, chat_completion_source, max_tokens, temperature, custom_url, ...props }) { static createRequestData({ stream = false, messages, model, chat_completion_source, max_tokens, temperature, custom_url, reverse_proxy, proxy_password, ...props }) {
const payload = { const payload = {
...props,
stream, stream,
messages, messages,
model, model,
@@ -397,6 +398,11 @@ export class ChatCompletionService {
max_tokens, max_tokens,
temperature, temperature,
custom_url, custom_url,
reverse_proxy,
proxy_password,
use_makersuite_sysprompt: true,
claude_use_sysprompt: true,
...props,
}; };
// Remove undefined values to avoid API errors // Remove undefined values to avoid API errors

View File

@@ -661,6 +661,7 @@ function generateExtensionHtml(name, manifest, isActive, isDisabled, isExternal,
let deleteButton = isExternal ? `<button class="btn_delete menu_button" data-name="${externalId}" data-i18n="[title]Delete" title="Delete"><i class="fa-fw fa-solid fa-trash-can"></i></button>` : ''; let deleteButton = isExternal ? `<button class="btn_delete menu_button" data-name="${externalId}" data-i18n="[title]Delete" title="Delete"><i class="fa-fw fa-solid fa-trash-can"></i></button>` : '';
let updateButton = isExternal ? `<button class="btn_update menu_button displayNone" data-name="${externalId}" title="Update available"><i class="fa-solid fa-download fa-fw"></i></button>` : ''; let updateButton = isExternal ? `<button class="btn_update menu_button displayNone" data-name="${externalId}" title="Update available"><i class="fa-solid fa-download fa-fw"></i></button>` : '';
let moveButton = isExternal && isUserAdmin ? `<button class="btn_move menu_button" data-name="${externalId}" data-i18n="[title]Move" title="Move"><i class="fa-solid fa-folder-tree fa-fw"></i></button>` : ''; let moveButton = isExternal && isUserAdmin ? `<button class="btn_move menu_button" data-name="${externalId}" data-i18n="[title]Move" title="Move"><i class="fa-solid fa-folder-tree fa-fw"></i></button>` : '';
let branchButton = isExternal && isUserAdmin ? `<button class="btn_branch menu_button" data-name="${externalId}" data-i18n="[title]Switch branch" title="Switch branch"><i class="fa-solid fa-code-branch fa-fw"></i></button>` : '';
let modulesInfo = ''; let modulesInfo = '';
if (isActive && Array.isArray(manifest.optional)) { if (isActive && Array.isArray(manifest.optional)) {
@@ -701,6 +702,7 @@ function generateExtensionHtml(name, manifest, isActive, isDisabled, isExternal,
<div class="extension_actions flex-container alignItemsCenter"> <div class="extension_actions flex-container alignItemsCenter">
${updateButton} ${updateButton}
${branchButton}
${moveButton} ${moveButton}
${deleteButton} ${deleteButton}
</div> </div>
@@ -944,6 +946,44 @@ async function onDeleteClick() {
} }
} }
async function onBranchClick() {
const extensionName = $(this).data('name');
const isCurrentUserAdmin = isAdmin();
const isGlobal = getExtensionType(extensionName) === 'global';
if (isGlobal && !isCurrentUserAdmin) {
toastr.error(t`You don't have permission to switch branch.`);
return;
}
let newBranch = '';
const branches = await getExtensionBranches(extensionName, isGlobal);
const selectElement = document.createElement('select');
selectElement.classList.add('text_pole', 'wide100p');
selectElement.addEventListener('change', function () {
newBranch = this.value;
});
for (const branch of branches) {
const option = document.createElement('option');
option.value = branch.name;
option.textContent = `${branch.name} (${branch.commit}) [${branch.label}]`;
option.selected = branch.current;
selectElement.appendChild(option);
}
const popup = new Popup(selectElement, POPUP_TYPE.CONFIRM, '', {
okButton: t`Switch`,
cancelButton: t`Cancel`,
});
const popupResult = await popup.show();
if (!popupResult || !newBranch) {
return;
}
await switchExtensionBranch(extensionName, isGlobal, newBranch);
}
async function onMoveClick() { async function onMoveClick() {
const extensionName = $(this).data('name'); const extensionName = $(this).data('name');
const isCurrentUserAdmin = isAdmin(); const isCurrentUserAdmin = isAdmin();
@@ -1055,13 +1095,83 @@ async function getExtensionVersion(extensionName, abortSignal) {
} }
} }
/**
* Gets the list of branches for a specific extension.
* @param {string} extensionName The name of the extension
* @param {boolean} isGlobal Whether the extension is global or not
* @returns {Promise<ExtensionBranch[]>} List of branches for the extension
* @typedef {object} ExtensionBranch
* @property {string} name The name of the branch
* @property {string} commit The commit hash of the branch
* @property {boolean} current Whether this branch is the current one
* @property {string} label The commit label of the branch
*/
async function getExtensionBranches(extensionName, isGlobal) {
try {
const response = await fetch('/api/extensions/branches', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify({
extensionName,
global: isGlobal,
}),
});
if (!response.ok) {
const text = await response.text();
toastr.error(text || response.statusText, t`Extension branches fetch failed`);
console.error('Extension branches fetch failed', response.status, response.statusText, text);
return [];
}
return await response.json();
} catch (error) {
console.error('Error:', error);
return [];
}
}
/**
* Switches the branch of an extension.
* @param {string} extensionName The name of the extension
* @param {boolean} isGlobal If the extension is global
* @param {string} branch Branch name to switch to
* @returns {Promise<void>}
*/
async function switchExtensionBranch(extensionName, isGlobal, branch) {
try {
const response = await fetch('/api/extensions/switch', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify({
extensionName,
branch,
global: isGlobal,
}),
});
if (!response.ok) {
const text = await response.text();
toastr.error(text || response.statusText, t`Extension branch switch failed`);
console.error('Extension branch switch failed', response.status, response.statusText, text);
return;
}
toastr.success(t`Extension ${extensionName} switched to ${branch}`);
await loadExtensionSettings({}, false, false);
void showExtensionsDetails();
} catch (error) {
console.error('Error:', error);
}
}
/** /**
* Installs a third-party extension via the API. * Installs a third-party extension via the API.
* @param {string} url Extension repository URL * @param {string} url Extension repository URL
* @param {boolean} global Is the extension global? * @param {boolean} global Is the extension global?
* @returns {Promise<void>} * @returns {Promise<void>}
*/ */
export async function installExtension(url, global) { export async function installExtension(url, global, branch = '') {
console.debug('Extension installation started', url); console.debug('Extension installation started', url);
toastr.info(t`Please wait...`, t`Installing extension`); toastr.info(t`Please wait...`, t`Installing extension`);
@@ -1072,6 +1182,7 @@ export async function installExtension(url, global) {
body: JSON.stringify({ body: JSON.stringify({
url, url,
global, global,
branch,
}), }),
}); });
@@ -1406,9 +1517,17 @@ export async function openThirdPartyExtensionMenu(suggestUrl = '') {
await popup.complete(POPUP_RESULT.AFFIRMATIVE); await popup.complete(POPUP_RESULT.AFFIRMATIVE);
}, },
}; };
/** @type {import('./popup.js').CustomPopupInput} */
const branchNameInput = {
id: 'extension_branch_name',
label: t`Branch or tag name (optional)`,
type: 'text',
tooltip: 'e.g. main, dev, v1.0.0',
};
const customButtons = isCurrentUserAdmin ? [installForAllButton] : []; const customButtons = isCurrentUserAdmin ? [installForAllButton] : [];
const popup = new Popup(html, POPUP_TYPE.INPUT, suggestUrl ?? '', { okButton, customButtons }); const customInputs = [branchNameInput];
const popup = new Popup(html, POPUP_TYPE.INPUT, suggestUrl ?? '', { okButton, customButtons, customInputs });
const input = await popup.show(); const input = await popup.show();
if (!input) { if (!input) {
@@ -1417,7 +1536,8 @@ export async function openThirdPartyExtensionMenu(suggestUrl = '') {
} }
const url = String(input).trim(); const url = String(input).trim();
await installExtension(url, global); const branchName = String(popup.inputResults.get('extension_branch_name') ?? '').trim();
await installExtension(url, global, branchName);
} }
export async function initExtensions() { export async function initExtensions() {
@@ -1433,6 +1553,7 @@ export async function initExtensions() {
$(document).on('click', '.extensions_info .extension_block .btn_update', onUpdateClick); $(document).on('click', '.extensions_info .extension_block .btn_update', onUpdateClick);
$(document).on('click', '.extensions_info .extension_block .btn_delete', onDeleteClick); $(document).on('click', '.extensions_info .extension_block .btn_delete', onDeleteClick);
$(document).on('click', '.extensions_info .extension_block .btn_move', onMoveClick); $(document).on('click', '.extensions_info .extension_block .btn_move', onMoveClick);
$(document).on('click', '.extensions_info .extension_block .btn_branch', onBranchClick);
/** /**
* Handles the click event for the third-party extension import button. * Handles the click event for the third-party extension import button.

View File

@@ -291,7 +291,7 @@ async function installAsset(url, assetType, filename) {
try { try {
if (category === 'extension') { if (category === 'extension') {
console.debug(DEBUG_PREFIX, 'Installing extension ', url); console.debug(DEBUG_PREFIX, 'Installing extension ', url);
await installExtension(url); await installExtension(url, false);
console.debug(DEBUG_PREFIX, 'Extension installed.'); console.debug(DEBUG_PREFIX, 'Extension installed.');
return; return;
} }
@@ -309,7 +309,7 @@ async function installAsset(url, assetType, filename) {
console.debug(DEBUG_PREFIX, 'Importing character ', filename); console.debug(DEBUG_PREFIX, 'Importing character ', filename);
const blob = await result.blob(); const blob = await result.blob();
const file = new File([blob], filename, { type: blob.type }); const file = new File([blob], filename, { type: blob.type });
await processDroppedFiles([file], true); await processDroppedFiles([file]);
console.debug(DEBUG_PREFIX, 'Character downloaded.'); console.debug(DEBUG_PREFIX, 'Character downloaded.');
} }
} }

View File

@@ -39,7 +39,7 @@ To install a single 3rd party extension, use the &quot;Install Extensions&quot;
<span data-i18n="Characters">Characters</span> <span data-i18n="Characters">Characters</span>
</div> </div>
</div> </div>
<div class="inline-drawer-content" id="assets_menu"> <div id="assets_menu">
</div> </div>
</div> </div>
</div> </div>

View File

@@ -428,6 +428,7 @@ jQuery(async function () {
'zerooneai': SECRET_KEYS.ZEROONEAI, 'zerooneai': SECRET_KEYS.ZEROONEAI,
'groq': SECRET_KEYS.GROQ, 'groq': SECRET_KEYS.GROQ,
'cohere': SECRET_KEYS.COHERE, 'cohere': SECRET_KEYS.COHERE,
'xai': SECRET_KEYS.XAI,
}; };
if (chatCompletionApis[api] && secret_state[chatCompletionApis[api]]) { if (chatCompletionApis[api] && secret_state[chatCompletionApis[api]]) {

View File

@@ -31,6 +31,7 @@
<option value="openrouter">OpenRouter</option> <option value="openrouter">OpenRouter</option>
<option value="ooba" data-i18n="Text Generation WebUI (oobabooga)">Text Generation WebUI (oobabooga)</option> <option value="ooba" data-i18n="Text Generation WebUI (oobabooga)">Text Generation WebUI (oobabooga)</option>
<option value="vllm">vLLM</option> <option value="vllm">vLLM</option>
<option value="xai">xAI (Grok)</option>
</select> </select>
</div> </div>
<div class="flex1 flex-container flexFlowColumn flexNoGap"> <div class="flex1 flex-container flexFlowColumn flexNoGap">
@@ -46,13 +47,24 @@
<option data-type="mistral" value="mistral-small-2503">mistral-small-2503</option> <option data-type="mistral" value="mistral-small-2503">mistral-small-2503</option>
<option data-type="mistral" value="mistral-small-latest">mistral-small-latest</option> <option data-type="mistral" value="mistral-small-latest">mistral-small-latest</option>
<option data-type="zerooneai" value="yi-vision">yi-vision</option> <option data-type="zerooneai" value="yi-vision">yi-vision</option>
<option data-type="openai" value="gpt-4.1">gpt-4.1</option>
<option data-type="openai" value="gpt-4.1-2025-04-14">gpt-4.1-2025-04-14</option>
<option data-type="openai" value="gpt-4.1-mini">gpt-4.1-mini</option>
<option data-type="openai" value="gpt-4.1-mini-2025-04-14">gpt-4.1-mini-2025-04-14</option>
<option data-type="openai" value="gpt-4.1-nano">gpt-4.1-nano</option>
<option data-type="openai" value="gpt-4.1-nano-2025-04-14">gpt-4.1-nano-2025-04-14</option>
<option data-type="openai" value="gpt-4-vision-preview">gpt-4-vision-preview</option> <option data-type="openai" value="gpt-4-vision-preview">gpt-4-vision-preview</option>
<option data-type="openai" value="gpt-4-turbo">gpt-4-turbo</option> <option data-type="openai" value="gpt-4-turbo">gpt-4-turbo</option>
<option data-type="openai" value="gpt-4o">gpt-4o</option> <option data-type="openai" value="gpt-4o">gpt-4o</option>
<option data-type="openai" value="gpt-4o-mini">gpt-4o-mini</option> <option data-type="openai" value="gpt-4o-mini">gpt-4o-mini</option>
<option data-type="openai" value="gpt-4o-mini-2024-07-18">gpt-4o-mini-2024-07-18</option>
<option data-type="openai" value="chatgpt-4o-latest">chatgpt-4o-latest</option> <option data-type="openai" value="chatgpt-4o-latest">chatgpt-4o-latest</option>
<option data-type="openai" value="o1">o1</option> <option data-type="openai" value="o1">o1</option>
<option data-type="openai" value="o1-2024-12-17">o1-2024-12-17</option> <option data-type="openai" value="o1-2024-12-17">o1-2024-12-17</option>
<option data-type="openai" value="o3">o3</option>
<option data-type="openai" value="o3-2025-04-16">o3-2025-04-16</option>
<option data-type="openai" value="o4-mini">o4-mini</option>
<option data-type="openai" value="o4-mini-2025-04-16">o4-mini-2025-04-16</option>
<option data-type="openai" value="gpt-4.5-preview">gpt-4.5-preview</option> <option data-type="openai" value="gpt-4.5-preview">gpt-4.5-preview</option>
<option data-type="openai" value="gpt-4.5-preview-2025-02-27">gpt-4.5-preview-2025-02-27</option> <option data-type="openai" value="gpt-4.5-preview-2025-02-27">gpt-4.5-preview-2025-02-27</option>
<option data-type="anthropic" value="claude-3-7-sonnet-latest">claude-3-7-sonnet-latest</option> <option data-type="anthropic" value="claude-3-7-sonnet-latest">claude-3-7-sonnet-latest</option>
@@ -67,33 +79,33 @@
<option data-type="anthropic" value="claude-3-haiku-20240307">claude-3-haiku-20240307</option> <option data-type="anthropic" value="claude-3-haiku-20240307">claude-3-haiku-20240307</option>
<option data-type="google" value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option> <option data-type="google" value="gemini-2.5-pro-preview-03-25">gemini-2.5-pro-preview-03-25</option>
<option data-type="google" value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option> <option data-type="google" value="gemini-2.5-pro-exp-03-25">gemini-2.5-pro-exp-03-25</option>
<option data-type="google" value="gemini-2.0-pro-exp">gemini-2.0-pro-exp</option> <option data-type="google" value="gemini-2.5-flash-preview-04-17">gemini-2.5-flash-preview-04-17</option>
<option data-type="google" value="gemini-2.0-pro-exp-02-05">gemini-2.0-pro-exp-02-05</option> <option data-type="google" value="gemini-2.0-pro-exp-02-05">gemini-2.0-pro-exp-02-05 → 2.5-pro-exp-03-25</option>
<option data-type="google" value="gemini-2.0-flash-lite-preview">gemini-2.0-flash-lite-preview</option> <option data-type="google" value="gemini-2.0-pro-exp">gemini-2.0-pro-exp → 2.5-pro-exp-03-25</option>
<option data-type="google" value="gemini-2.0-flash-lite-preview-02-05">gemini-2.0-flash-lite-preview-02-05</option> <option data-type="google" value="gemini-exp-1206">gemini-exp-1206 → 2.5-pro-exp-03-25</option>
<option data-type="google" value="gemini-2.0-flash">gemini-2.0-flash</option>
<option data-type="google" value="gemini-2.0-flash-001">gemini-2.0-flash-001</option> <option data-type="google" value="gemini-2.0-flash-001">gemini-2.0-flash-001</option>
<option data-type="google" value="gemini-2.0-flash-exp">gemini-2.0-flash-exp</option>
<option data-type="google" value="gemini-2.0-flash-exp-image-generation">gemini-2.0-flash-exp-image-generation</option> <option data-type="google" value="gemini-2.0-flash-exp-image-generation">gemini-2.0-flash-exp-image-generation</option>
<option data-type="google" value="gemini-2.0-flash-thinking-exp">gemini-2.0-flash-thinking-exp</option> <option data-type="google" value="gemini-2.0-flash-exp">gemini-2.0-flash-exp</option>
<option data-type="google" value="gemini-2.0-flash-thinking-exp-01-21">gemini-2.0-flash-thinking-exp-01-21</option> <option data-type="google" value="gemini-2.0-flash">gemini-2.0-flash</option>
<option data-type="google" value="gemini-2.0-flash-thinking-exp-1219">gemini-2.0-flash-thinking-exp-1219</option> <option data-type="google" value="gemini-2.0-flash-thinking-exp-01-21">gemini-2.0-flash-thinking-exp-01-21 → 2.5-flash-preview-04-17</option>
<option data-type="google" value="gemini-1.5-flash">gemini-1.5-flash</option> <option data-type="google" value="gemini-2.0-flash-thinking-exp-1219">gemini-2.0-flash-thinking-exp-1219 → 2.5-flash-preview-04-17</option>
<option data-type="google" value="gemini-1.5-flash-latest">gemini-1.5-flash-latest</option> <option data-type="google" value="gemini-2.0-flash-thinking-exp">gemini-2.0-flash-thinking-exp → 2.5-flash-preview-04-17</option>
<option data-type="google" value="gemini-1.5-flash-001">gemini-1.5-flash-001</option> <option data-type="google" value="gemini-2.0-flash-lite-001">gemini-2.0-flash-lite-001</option>
<option data-type="google" value="gemini-1.5-flash-002">gemini-1.5-flash-002</option> <option data-type="google" value="gemini-2.0-flash-lite-preview-02-05">gemini-2.0-flash-lite-preview-02-05</option>
<option data-type="google" value="gemini-1.5-flash-exp-0827">gemini-1.5-flash-exp-0827</option> <option data-type="google" value="gemini-2.0-flash-lite-preview">gemini-2.0-flash-lite-preview</option>
<option data-type="google" value="gemini-1.5-flash-8b-exp-0827">gemini-1.5-flash-8b-exp-0827</option>
<option data-type="google" value="gemini-1.5-flash-8b-exp-0924">gemini-1.5-flash-8b-exp-0924</option>
<option data-type="google" value="gemini-exp-1114">gemini-exp-1114</option>
<option data-type="google" value="gemini-exp-1121">gemini-exp-1121</option>
<option data-type="google" value="gemini-exp-1206">gemini-exp-1206</option>
<option data-type="google" value="gemini-1.5-pro">gemini-1.5-pro</option>
<option data-type="google" value="gemini-1.5-pro-latest">gemini-1.5-pro-latest</option> <option data-type="google" value="gemini-1.5-pro-latest">gemini-1.5-pro-latest</option>
<option data-type="google" value="gemini-1.5-pro-001">gemini-1.5-pro-001</option>
<option data-type="google" value="gemini-1.5-pro-002">gemini-1.5-pro-002</option> <option data-type="google" value="gemini-1.5-pro-002">gemini-1.5-pro-002</option>
<option data-type="google" value="gemini-1.5-pro-exp-0801">gemini-1.5-pro-exp-0801</option> <option data-type="google" value="gemini-1.5-pro-001">gemini-1.5-pro-001</option>
<option data-type="google" value="gemini-1.5-pro-exp-0827">gemini-1.5-pro-exp-0827</option> <option data-type="google" value="gemini-1.5-pro">gemini-1.5-pro</option>
<option data-type="google" value="gemini-1.5-flash-latest">gemini-1.5-flash-latest</option>
<option data-type="google" value="gemini-1.5-flash-002">gemini-1.5-flash-002</option>
<option data-type="google" value="gemini-1.5-flash-001">gemini-1.5-flash-001</option>
<option data-type="google" value="gemini-1.5-flash">gemini-1.5-flash</option>
<option data-type="google" value="gemini-1.5-flash-8b-001">gemini-1.5-flash-8b-001</option>
<option data-type="google" value="gemini-1.5-flash-8b-exp-0924">gemini-1.5-flash-8b-exp-0924</option>
<option data-type="google" value="gemini-1.5-flash-8b-exp-0827">gemini-1.5-flash-8b-exp-0827</option>
<option data-type="google" value="learnlm-2.0-flash-experimental">learnlm-2.0-flash-experimental</option>
<option data-type="google" value="learnlm-1.5-pro-experimental">learnlm-1.5-pro-experimental</option>
<option data-type="groq" value="llama-3.2-11b-vision-preview">llama-3.2-11b-vision-preview</option> <option data-type="groq" value="llama-3.2-11b-vision-preview">llama-3.2-11b-vision-preview</option>
<option data-type="groq" value="llama-3.2-90b-vision-preview">llama-3.2-90b-vision-preview</option> <option data-type="groq" value="llama-3.2-90b-vision-preview">llama-3.2-90b-vision-preview</option>
<option data-type="groq" value="llava-v1.5-7b-4096-preview">llava-v1.5-7b-4096-preview</option> <option data-type="groq" value="llava-v1.5-7b-4096-preview">llava-v1.5-7b-4096-preview</option>
@@ -134,6 +146,8 @@
<option data-type="koboldcpp" value="koboldcpp_current" data-i18n="currently_loaded">[Currently loaded]</option> <option data-type="koboldcpp" value="koboldcpp_current" data-i18n="currently_loaded">[Currently loaded]</option>
<option data-type="vllm" value="vllm_current" data-i18n="currently_selected">[Currently selected]</option> <option data-type="vllm" value="vllm_current" data-i18n="currently_selected">[Currently selected]</option>
<option data-type="custom" value="custom_current" data-i18n="currently_selected">[Currently selected]</option> <option data-type="custom" value="custom_current" data-i18n="currently_selected">[Currently selected]</option>
<option data-type="xai" value="grok-2-vision-1212">grok-2-vision-1212</option>
<option data-type="xai" value="grok-vision-beta">grok-vision-beta</option>
</select> </select>
</div> </div>
<div data-type="ollama"> <div data-type="ollama">

View File

@@ -132,7 +132,7 @@
</label> </label>
<label class="flex-container alignItemsCenter" title="How many messages before the current end of the chat." data-i18n="[title]How many messages before the current end of the chat."> <label class="flex-container alignItemsCenter" title="How many messages before the current end of the chat." data-i18n="[title]How many messages before the current end of the chat.">
<input type="radio" name="memory_position" value="1" /> <input type="radio" name="memory_position" value="1" />
<span data-i18n="In-chat @ Depth">In-chat @ Depth</span> <input id="memory_depth" class="text_pole widthUnset" type="number" min="0" max="999" /> <span data-i18n="In-chat @ Depth">In-chat @ Depth</span> <input id="memory_depth" class="text_pole widthUnset" type="number" min="0" max="9999" />
<span data-i18n="as">as</span> <span data-i18n="as">as</span>
<select id="memory_role" class="text_pole widthNatural"> <select id="memory_role" class="text_pole widthNatural">
<option value="0" data-i18n="System">System</option> <option value="0" data-i18n="System">System</option>

View File

@@ -113,14 +113,14 @@
<span data-i18n="Min Depth">Min Depth</span> <span data-i18n="Min Depth">Min Depth</span>
<span class="fa-solid fa-circle-question note-link-span"></span> <span class="fa-solid fa-circle-question note-link-span"></span>
</small> </small>
<input name="min_depth" class="text_pole textarea_compact" type="number" min="-1" max="999" data-i18n="[placeholder]ext_regex_min_depth_placeholder" placeholder="Unlimited" /> <input name="min_depth" class="text_pole textarea_compact" type="number" min="-1" max="9999" data-i18n="[placeholder]ext_regex_min_depth_placeholder" placeholder="Unlimited" />
</div> </div>
<div class="flex1 flex-container flexNoGap"> <div class="flex1 flex-container flexNoGap">
<small data-i18n="[title]ext_regex_max_depth_desc" title="When applied to prompts or display, only affect messages no more than N levels deep. 0 = last message, 1 = penultimate message, etc. System prompt and utility prompts are not affected. Max must be greater than Min for regex to apply."> <small data-i18n="[title]ext_regex_max_depth_desc" title="When applied to prompts or display, only affect messages no more than N levels deep. 0 = last message, 1 = penultimate message, etc. System prompt and utility prompts are not affected. Max must be greater than Min for regex to apply.">
<span data-i18n="Max Depth">Max Depth</span> <span data-i18n="Max Depth">Max Depth</span>
<span class="fa-solid fa-circle-question note-link-span"></span> <span class="fa-solid fa-circle-question note-link-span"></span>
</small> </small>
<input name="max_depth" class="text_pole textarea_compact" type="number" min="0" max="999" data-i18n="[placeholder]ext_regex_min_depth_placeholder" placeholder="Unlimited" /> <input name="max_depth" class="text_pole textarea_compact" type="number" min="0" max="9999" data-i18n="[placeholder]ext_regex_min_depth_placeholder" placeholder="Unlimited" />
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,7 +1,7 @@
import { CONNECT_API_MAP, getRequestHeaders } from '../../script.js'; import { CONNECT_API_MAP, getRequestHeaders } from '../../script.js';
import { extension_settings, openThirdPartyExtensionMenu } from '../extensions.js'; import { extension_settings, openThirdPartyExtensionMenu } from '../extensions.js';
import { t } from '../i18n.js'; import { t } from '../i18n.js';
import { oai_settings } from '../openai.js'; import { oai_settings, proxies } from '../openai.js';
import { SECRET_KEYS, secret_state } from '../secrets.js'; import { SECRET_KEYS, secret_state } from '../secrets.js';
import { textgen_types, textgenerationwebui_settings } from '../textgen-settings.js'; import { textgen_types, textgenerationwebui_settings } from '../textgen-settings.js';
import { getTokenCountAsync } from '../tokenizers.js'; import { getTokenCountAsync } from '../tokenizers.js';
@@ -153,6 +153,10 @@ function throwIfInvalidModel(useReverseProxy) {
throw new Error('Cohere API key is not set.'); throw new Error('Cohere API key is not set.');
} }
if (extension_settings.caption.multimodal_api === 'xai' && !secret_state[SECRET_KEYS.XAI]) {
throw new Error('xAI API key is not set.');
}
if (extension_settings.caption.multimodal_api === 'ollama' && !textgenerationwebui_settings.server_urls[textgen_types.OLLAMA]) { if (extension_settings.caption.multimodal_api === 'ollama' && !textgenerationwebui_settings.server_urls[textgen_types.OLLAMA]) {
throw new Error('Ollama server URL is not set.'); throw new Error('Ollama server URL is not set.');
} }
@@ -306,9 +310,10 @@ export class ConnectionManagerRequestService {
* @param {boolean?} [custom.includePreset=true] * @param {boolean?} [custom.includePreset=true]
* @param {boolean?} [custom.includeInstruct=true] * @param {boolean?} [custom.includeInstruct=true]
* @param {Partial<InstructSettings>?} [custom.instructSettings] Override instruct settings * @param {Partial<InstructSettings>?} [custom.instructSettings] Override instruct settings
* @param {Record<string, any>} [overridePayload] - Override payload for the request
* @returns {Promise<import('../custom-request.js').ExtractedData | (() => AsyncGenerator<import('../custom-request.js').StreamResponse>)>} If not streaming, returns extracted data; if streaming, returns a function that creates an AsyncGenerator * @returns {Promise<import('../custom-request.js').ExtractedData | (() => AsyncGenerator<import('../custom-request.js').StreamResponse>)>} If not streaming, returns extracted data; if streaming, returns a function that creates an AsyncGenerator
*/ */
static async sendRequest(profileId, prompt, maxTokens, custom = this.defaultSendRequestParams) { static async sendRequest(profileId, prompt, maxTokens, custom = this.defaultSendRequestParams, overridePayload = {}) {
const { stream, signal, extractData, includePreset, includeInstruct, instructSettings } = { ...this.defaultSendRequestParams, ...custom }; const { stream, signal, extractData, includePreset, includeInstruct, instructSettings } = { ...this.defaultSendRequestParams, ...custom };
const context = SillyTavern.getContext(); const context = SillyTavern.getContext();
@@ -326,6 +331,8 @@ export class ConnectionManagerRequestService {
throw new Error(`API type ${selectedApiMap.selected} does not support chat completions`); throw new Error(`API type ${selectedApiMap.selected} does not support chat completions`);
} }
const proxyPreset = proxies.find((p) => p.name === profile.proxy);
const messages = Array.isArray(prompt) ? prompt : [{ role: 'user', content: prompt }]; const messages = Array.isArray(prompt) ? prompt : [{ role: 'user', content: prompt }];
return await context.ChatCompletionService.processRequest({ return await context.ChatCompletionService.processRequest({
stream, stream,
@@ -334,6 +341,9 @@ export class ConnectionManagerRequestService {
model: profile.model, model: profile.model,
chat_completion_source: selectedApiMap.source, chat_completion_source: selectedApiMap.source,
custom_url: profile['api-url'], custom_url: profile['api-url'],
reverse_proxy: proxyPreset?.url,
proxy_password: proxyPreset?.password,
...overridePayload,
}, { }, {
presetName: includePreset ? profile.preset : undefined, presetName: includePreset ? profile.preset : undefined,
}, extractData, signal); }, extractData, signal);
@@ -350,6 +360,7 @@ export class ConnectionManagerRequestService {
model: profile.model, model: profile.model,
api_type: selectedApiMap.type, api_type: selectedApiMap.type,
api_server: profile['api-url'], api_server: profile['api-url'],
...overridePayload,
}, { }, {
instructName: includeInstruct ? profile.instruct : undefined, instructName: includeInstruct ? profile.instruct : undefined,
presetName: includePreset ? profile.preset : undefined, presetName: includePreset ? profile.preset : undefined,

Some files were not shown because too many files have changed in this diff Show More