mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'dev' of https://github.com/SillyLossy/TavernAI into dev
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
const port = 8000;
|
const port = 8000;
|
||||||
const whitelist = ['127.0.0.1','192.168.0.*']; //Example for add several IP in whitelist: ['127.0.0.1', '192.168.0.10']
|
const whitelist = ['127.0.0.1','192.168.0.*']; //Example for add several IP in whitelist: ['127.0.0.1', '192.168.0.10']
|
||||||
const whitelistMode = false//Disabling enabling the ip whitelist mode. true/false
|
const whitelistMode = false; //Disabling enabling the ip whitelist mode. true/false
|
||||||
const autorun = true; //Autorun in the browser. true/false
|
const autorun = true; //Autorun in the browser. true/false
|
||||||
const enableExtensions = true; //Enables support for TavernAI-extras project
|
const enableExtensions = true; //Enables support for TavernAI-extras project
|
||||||
const listen = true; // If true, Can be access from other device or PC. otherwise can be access only from hosting machine.
|
const listen = true; // If true, Can be access from other device or PC. otherwise can be access only from hosting machine.
|
||||||
|
@@ -4189,4 +4189,10 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '.inline-drawer-toggle', function () {
|
||||||
|
var icon = $(this).find('.inline-drawer-icon');
|
||||||
|
icon.toggleClass('down up');
|
||||||
|
$(this).closest('.inline-drawer').find('.inline-drawer-content').slideToggle();
|
||||||
|
});
|
||||||
})
|
})
|
||||||
|
@@ -202,8 +202,16 @@ async function setExpression(character, expression) {
|
|||||||
const html = `
|
const html = `
|
||||||
<div class="expression_settings">
|
<div class="expression_settings">
|
||||||
<h4>Expression images</h4>
|
<h4>Expression images</h4>
|
||||||
<ul id="image_list"></ul>
|
<div class="inline-drawer">
|
||||||
<p><b>Hint:</b> <i>Create new folder in the <tt>public/characters/</tt> folder and name it as the name of the character. Put PNG images with expressions there.</i></p>
|
<div class="inline-drawer-toggle inline-drawer-header">
|
||||||
|
<b>View supported images</b>
|
||||||
|
<div class="inline-drawer-icon down"></div>
|
||||||
|
</div>
|
||||||
|
<div class="inline-drawer-content">
|
||||||
|
<ul id="image_list"></ul>
|
||||||
|
<p class="hint"><b>Hint:</b> <i>Create new folder in the <b>public/characters/</b> folder and name it as the name of the character. Put PNG images with expressions there.</i></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<label for="expressions_show_default"><input id="expressions_show_default" type="checkbox">Show default images (emojis) if missing</label>
|
<label for="expressions_show_default"><input id="expressions_show_default" type="checkbox">Show default images (emojis) if missing</label>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
@@ -45,12 +45,9 @@ img.expression {
|
|||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.expression_settings {
|
|
||||||
white-space: pre-line;
|
|
||||||
}
|
|
||||||
|
|
||||||
.expression_settings p {
|
.expression_settings p {
|
||||||
margin-bottom: 0px;
|
margin-top: 0.5rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.expression_settings label {
|
.expression_settings label {
|
||||||
|
@@ -320,24 +320,32 @@ function setMemoryContext(value, saveToMessage) {
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
function addExtensionControls() {
|
function addExtensionControls() {
|
||||||
const settingsHtml = `
|
const settingsHtml = `
|
||||||
<h4>Memory</h4>
|
|
||||||
<div id="memory_settings">
|
<div id="memory_settings">
|
||||||
|
<h4>Memory</h4>
|
||||||
<label for="memory_contents">Memory contents</label>
|
<label for="memory_contents">Memory contents</label>
|
||||||
<textarea id="memory_contents" class="text_pole" rows="8" placeholder="Context will be generated here..."></textarea>
|
<textarea id="memory_contents" class="text_pole" rows="8" placeholder="Context will be generated here..."></textarea>
|
||||||
<div class="memory_contents_controls">
|
<div class="memory_contents_controls">
|
||||||
<input id="memory_restore" class="menu_button" type="submit" value="Restore previous state" />
|
<input id="memory_restore" class="menu_button" type="submit" value="Restore previous state" />
|
||||||
<label for="memory_frozen"><input id="memory_frozen" type="checkbox" /> Freeze context</label>
|
<label for="memory_frozen"><input id="memory_frozen" type="checkbox" /> Freeze context</label>
|
||||||
</div>
|
</div>
|
||||||
<label for="memory_short_length">Memory summarization [short-term] length (<span id="memory_short_length_tokens"></span> tokens)</label>
|
<div class="inline-drawer">
|
||||||
<input id="memory_short_length" type="range" value="${defaultSettings.shortMemoryLength}" min="${defaultSettings.minShortMemory}" max="${defaultSettings.maxShortMemory}" step="${defaultSettings.shortMemoryStep}" />
|
<div class="inline-drawer-toggle inline-drawer-header">
|
||||||
<label for="memory_long_length">Memory context [long-term] length (<span id="memory_long_length_tokens"></span> tokens)</label>
|
<b>Summarization settings</b>
|
||||||
<input id="memory_long_length" type="range" value="${defaultSettings.longMemoryLength}" min="${defaultSettings.minLongMemory}" max="${defaultSettings.maxLongMemory}" step="${defaultSettings.longMemoryStep}" />
|
<div class="inline-drawer-icon down"></div>
|
||||||
<label for="memory_temperature">Summarization temperature (<span id="memory_temperature_value"></span>)</label>
|
</div>
|
||||||
<input id="memory_temperature" type="range" value="${defaultSettings.temperature}" min="${defaultSettings.minTemperature}" max="${defaultSettings.maxTemperature}" step="${defaultSettings.temperatureStep}" />
|
<div class="inline-drawer-content">
|
||||||
<label for="memory_repetition_penalty">Summarization repetition penalty (<span id="memory_repetition_penalty_value"></span>)</label>
|
<label for="memory_short_length">Memory summarization [short-term] length (<span id="memory_short_length_tokens"></span> tokens)</label>
|
||||||
<input id="memory_repetition_penalty" type="range" value="${defaultSettings.repetitionPenalty}" min="${defaultSettings.minRepetitionPenalty}" max="${defaultSettings.maxRepetitionPenalty}" step="${defaultSettings.repetitionPenaltyStep}" />
|
<input id="memory_short_length" type="range" value="${defaultSettings.shortMemoryLength}" min="${defaultSettings.minShortMemory}" max="${defaultSettings.maxShortMemory}" step="${defaultSettings.shortMemoryStep}" />
|
||||||
<label for="memory_length_penalty">Summarization length penalty (<span id="memory_length_penalty_value"></span>)</label>
|
<label for="memory_long_length">Memory context [long-term] length (<span id="memory_long_length_tokens"></span> tokens)</label>
|
||||||
<input id="memory_length_penalty" type="range" value="${defaultSettings.lengthPenalty}" min="${defaultSettings.minLengthPenalty}" max="${defaultSettings.maxLengthPenalty}" step="${defaultSettings.lengthPenaltyStep}" />
|
<input id="memory_long_length" type="range" value="${defaultSettings.longMemoryLength}" min="${defaultSettings.minLongMemory}" max="${defaultSettings.maxLongMemory}" step="${defaultSettings.longMemoryStep}" />
|
||||||
|
<label for="memory_temperature">Summarization temperature (<span id="memory_temperature_value"></span>)</label>
|
||||||
|
<input id="memory_temperature" type="range" value="${defaultSettings.temperature}" min="${defaultSettings.minTemperature}" max="${defaultSettings.maxTemperature}" step="${defaultSettings.temperatureStep}" />
|
||||||
|
<label for="memory_repetition_penalty">Summarization repetition penalty (<span id="memory_repetition_penalty_value"></span>)</label>
|
||||||
|
<input id="memory_repetition_penalty" type="range" value="${defaultSettings.repetitionPenalty}" min="${defaultSettings.minRepetitionPenalty}" max="${defaultSettings.maxRepetitionPenalty}" step="${defaultSettings.repetitionPenaltyStep}" />
|
||||||
|
<label for="memory_length_penalty">Summarization length penalty (<span id="memory_length_penalty_value"></span>)</label>
|
||||||
|
<input id="memory_length_penalty" type="range" value="${defaultSettings.lengthPenalty}" min="${defaultSettings.minLengthPenalty}" max="${defaultSettings.maxLengthPenalty}" step="${defaultSettings.lengthPenaltyStep}" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
$('#extensions_settings').append(settingsHtml);
|
$('#extensions_settings').append(settingsHtml);
|
||||||
|
@@ -2744,10 +2744,37 @@ filter: invert(20%) sepia(100%) saturate(2518%) hue-rotate(353deg) brightness(93
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .drawer-header {
|
.inline-drawer {
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-drawer-icon {
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
filter: invert(1) brightness(75%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-drawer-icon.up {
|
||||||
|
background-image: url('img/circle-chevron-up-solid.svg');
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-drawer-icon.down {
|
||||||
|
background-image: url('img/circle-chevron-down-solid.svg');
|
||||||
|
}
|
||||||
|
|
||||||
|
.inline-drawer-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
} */
|
}
|
||||||
|
|
||||||
|
.inline-drawer-content {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.drawer-content {
|
.drawer-content {
|
||||||
background-color: var(--black50a);
|
background-color: var(--black50a);
|
||||||
|
Reference in New Issue
Block a user