mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Formatting setting to send reasoning back to the model
Supersedes #3352
This commit is contained in:
@ -253,6 +253,14 @@ let power_user = {
|
||||
content: 'Write {{char}}\'s next reply in a fictional chat between {{char}} and {{user}}.',
|
||||
},
|
||||
|
||||
reasoning: {
|
||||
add_to_prompts: false,
|
||||
prefix: '<think>\n',
|
||||
suffix: '\n</think>',
|
||||
separator: '\n',
|
||||
max_additions: 1,
|
||||
},
|
||||
|
||||
personas: {},
|
||||
default_persona: null,
|
||||
persona_descriptions: {},
|
||||
@ -1613,6 +1621,7 @@ async function loadPowerUserSettings(settings, data) {
|
||||
loadMovingUIState();
|
||||
loadCharListState();
|
||||
toggleMDHotkeyIconDisplay();
|
||||
loadReasoningSettings();
|
||||
}
|
||||
|
||||
function toggleMDHotkeyIconDisplay() {
|
||||
@ -1629,6 +1638,38 @@ function loadCharListState() {
|
||||
document.body.classList.toggle('charListGrid', power_user.charListGrid);
|
||||
}
|
||||
|
||||
function loadReasoningSettings() {
|
||||
$('#reasoning_add_to_prompts').prop('checked', power_user.reasoning.add_to_prompts);
|
||||
$('#reasoning_add_to_prompts').on('change', function () {
|
||||
power_user.reasoning.add_to_prompts = !!$(this).prop('checked');
|
||||
saveSettingsDebounced();
|
||||
});
|
||||
|
||||
$('#reasoning_prefix').val(power_user.reasoning.prefix);
|
||||
$('#reasoning_prefix').on('input', function () {
|
||||
power_user.reasoning.prefix = String($(this).val());
|
||||
saveSettingsDebounced();
|
||||
});
|
||||
|
||||
$('#reasoning_suffix').val(power_user.reasoning.suffix);
|
||||
$('#reasoning_suffix').on('input', function () {
|
||||
power_user.reasoning.suffix = String($(this).val());
|
||||
saveSettingsDebounced();
|
||||
});
|
||||
|
||||
$('#reasoning_separator').val(power_user.reasoning.separator);
|
||||
$('#reasoning_separator').on('input', function () {
|
||||
power_user.reasoning.separator = String($(this).val());
|
||||
saveSettingsDebounced();
|
||||
});
|
||||
|
||||
$('#reasoning_max_additions').val(power_user.reasoning.max_additions);
|
||||
$('#reasoning_max_additions').on('input', function () {
|
||||
power_user.reasoning.max_additions = Number($(this).val());
|
||||
saveSettingsDebounced();
|
||||
});
|
||||
}
|
||||
|
||||
function loadMovingUIState() {
|
||||
if (!isMobile()
|
||||
&& power_user.movingUIState
|
||||
|
Reference in New Issue
Block a user