mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add None continue postfix for chat completion
This commit is contained in:
@ -1696,16 +1696,20 @@
|
|||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline-drawer-content">
|
<div class="inline-drawer-content">
|
||||||
|
<label class="checkbox_label flexWrap alignItemsCenter" for="continue_postfix_none">
|
||||||
|
<input type="radio" id="continue_postfix_none" name="continue_postfix" value="0">
|
||||||
|
<span data-i18n="None">None</span>
|
||||||
|
</label>
|
||||||
<label class="checkbox_label flexWrap alignItemsCenter" for="continue_postfix_space">
|
<label class="checkbox_label flexWrap alignItemsCenter" for="continue_postfix_space">
|
||||||
<input type="radio" id="continue_postfix_space" name="continue_postfix" value="0">
|
<input type="radio" id="continue_postfix_space" name="continue_postfix" value="1">
|
||||||
<span data-i18n="Space">Space</span>
|
<span data-i18n="Space">Space</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="checkbox_label flexWrap alignItemsCenter" for="continue_postfix_newline">
|
<label class="checkbox_label flexWrap alignItemsCenter" for="continue_postfix_newline">
|
||||||
<input type="radio" id="continue_postfix_newline" name="continue_postfix" value="1">
|
<input type="radio" id="continue_postfix_newline" name="continue_postfix" value="2">
|
||||||
<span data-i18n="Newline">Newline</span>
|
<span data-i18n="Newline">Newline</span>
|
||||||
</label>
|
</label>
|
||||||
<label class="checkbox_label flexWrap alignItemsCenter" for="continue_postfix_double_newline">
|
<label class="checkbox_label flexWrap alignItemsCenter" for="continue_postfix_double_newline">
|
||||||
<input type="radio" id="continue_postfix_double_newline" name="continue_postfix" value="2">
|
<input type="radio" id="continue_postfix_double_newline" name="continue_postfix" value="3">
|
||||||
<span data-i18n="Double Newline">Double Newline</span>
|
<span data-i18n="Double Newline">Double Newline</span>
|
||||||
</label>
|
</label>
|
||||||
<!-- Hidden input for loading radio buttons from presets. Don't remove! -->
|
<!-- Hidden input for loading radio buttons from presets. Don't remove! -->
|
||||||
|
@ -191,6 +191,7 @@ const character_names_behavior = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const continue_postfix_types = {
|
const continue_postfix_types = {
|
||||||
|
NONE: '',
|
||||||
SPACE: ' ',
|
SPACE: ' ',
|
||||||
NEWLINE: '\n',
|
NEWLINE: '\n',
|
||||||
DOUBLE_NEWLINE: '\n\n',
|
DOUBLE_NEWLINE: '\n\n',
|
||||||
@ -3138,6 +3139,9 @@ function setNamesBehaviorControls() {
|
|||||||
|
|
||||||
function setContinuePostfixControls() {
|
function setContinuePostfixControls() {
|
||||||
switch (oai_settings.continue_postfix) {
|
switch (oai_settings.continue_postfix) {
|
||||||
|
case continue_postfix_types.NONE:
|
||||||
|
$('#continue_postfix_none').prop('checked', true);
|
||||||
|
break;
|
||||||
case continue_postfix_types.SPACE:
|
case continue_postfix_types.SPACE:
|
||||||
$('#continue_postfix_space').prop('checked', true);
|
$('#continue_postfix_space').prop('checked', true);
|
||||||
break;
|
break;
|
||||||
@ -5078,6 +5082,12 @@ $(document).ready(async function () {
|
|||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#continue_postfix_none').on('input', function () {
|
||||||
|
oai_settings.continue_postfix = continue_postfix_types.NONE;
|
||||||
|
setContinuePostfixControls();
|
||||||
|
saveSettingsDebounced();
|
||||||
|
});
|
||||||
|
|
||||||
$('#continue_postfix_space').on('input', function () {
|
$('#continue_postfix_space').on('input', function () {
|
||||||
oai_settings.continue_postfix = continue_postfix_types.SPACE;
|
oai_settings.continue_postfix = continue_postfix_types.SPACE;
|
||||||
setContinuePostfixControls();
|
setContinuePostfixControls();
|
||||||
|
Reference in New Issue
Block a user