Fix disable_examples_formatting for pinned Pygmalion examples

This commit is contained in:
Grzegorz Gidel
2023-04-25 02:03:57 +02:00
parent a76bd22cb4
commit d3e17a8e72

View File

@ -1438,7 +1438,7 @@ async function Generate(type, automatic_trigger, force_name2) {
const blockHeading = const blockHeading =
main_api === 'openai' ? '<START>' : // OpenAI handler always expects it main_api === 'openai' ? '<START>' : // OpenAI handler always expects it
power_user.custom_chat_separator ? power_user.custom_chat_separator : power_user.custom_chat_separator ? power_user.custom_chat_separator :
power_user.disable_examples_formatting && !(is_pygmalion && power_user.pin_examples) ? '' : power_user.disable_examples_formatting ? '' :
is_pygmalion ? '<START>' : `This is how ${name2} should talk`; is_pygmalion ? '<START>' : `This is how ${name2} should talk`;
let mesExamplesArray = mesExamples.split(/<START>/gi).slice(1).map(block => `${blockHeading}\n${block.trim()}\n`); let mesExamplesArray = mesExamples.split(/<START>/gi).slice(1).map(block => `${blockHeading}\n${block.trim()}\n`);