mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
[FEATURE_REQUEST] Option to toggle disable instruct formatting for example dialogue insertion #1881
This commit is contained in:
@ -30,6 +30,7 @@ const controls = [
|
||||
{ id: 'instruct_last_output_sequence', property: 'last_output_sequence', isCheckbox: false },
|
||||
{ id: 'instruct_activation_regex', property: 'activation_regex', isCheckbox: false },
|
||||
{ id: 'instruct_bind_to_context', property: 'bind_to_context', isCheckbox: true },
|
||||
{ id: 'instruct_skip_examples', property: 'skip_examples', isCheckbox: true },
|
||||
];
|
||||
|
||||
/**
|
||||
@ -45,6 +46,10 @@ export function loadInstructMode(data) {
|
||||
power_user.instruct.names_force_groups = true;
|
||||
}
|
||||
|
||||
if (power_user.instruct.skip_examples === undefined) {
|
||||
power_user.instruct.skip_examples = false;
|
||||
}
|
||||
|
||||
controls.forEach(control => {
|
||||
const $element = $(`#${control.id}`);
|
||||
|
||||
@ -302,6 +307,10 @@ export function formatInstructModeSystemPrompt(systemPrompt){
|
||||
* @returns {string} Formatted example messages string.
|
||||
*/
|
||||
export function formatInstructModeExamples(mesExamples, name1, name2) {
|
||||
if (power_user.instruct.skip_examples) {
|
||||
return mesExamples;
|
||||
}
|
||||
|
||||
const includeNames = power_user.instruct.names || (!!selected_group && power_user.instruct.names_force_groups);
|
||||
|
||||
let inputSequence = power_user.instruct.input_sequence;
|
||||
|
Reference in New Issue
Block a user