Merge pull request #1116 from ThisIsPIRI/macro

Replace macros in example separator and chat start
This commit is contained in:
Cohee 2023-09-08 21:10:20 +03:00 committed by GitHub
commit 6f3947226f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2440,7 +2440,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
mesExamples = formatInstructModeExamples(mesExamples, name1, name2)
}
const exampleSeparator = power_user.context.example_separator ? `${power_user.context.example_separator}\n` : '';
const exampleSeparator = power_user.context.example_separator ? `${substituteParams(power_user.context.example_separator)}\n` : '';
const blockHeading = main_api === 'openai' ? '<START>\n' : exampleSeparator;
let mesExamplesArray = mesExamples.split(/<START>/gi).slice(1).map(block => `${blockHeading}${block.trim()}\n`);
@ -3422,7 +3422,7 @@ function addChatsPreamble(mesSendString) {
function addChatsSeparator(mesSendString) {
if (power_user.context.chat_start) {
return power_user.context.chat_start + '\n' + mesSendString;
return substituteParams(power_user.context.chat_start) + '\n' + mesSendString;
}
else {