Fix prompt-manager being rendered twice.

This commit is contained in:
maver 2023-06-27 20:40:17 +02:00
parent bf0dc07b1f
commit 6cea524f2c
2 changed files with 3 additions and 3 deletions

View File

@ -2810,7 +2810,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
quietPrompt: quiet_prompt,
jailbreakPrompt: jailbreakPrompt,
cyclePrompt: cyclePrompt,
});
}, dryRun);
generate_data = { prompt: prompt };
// counts will return false if the user has not enabled the token breakdown feature

View File

@ -590,7 +590,7 @@ function prepareOpenAIMessages({
quietPrompt,
extensionPrompts,
cyclePrompt
} = {}) {
} = {}, dryRun) {
const prompts = promptManager.getPromptCollection();
const chatCompletion = new ChatCompletion();
const userSettings = promptManager.serviceSettings;
@ -671,7 +671,7 @@ function prepareOpenAIMessages({
promptManager.populateTokenHandler(chatCompletion.getMessages());
// All information are up-to-date, render without dry-run.
promptManager.render(false);
if (false === dryRun) promptManager.render(false);
}
const chat = chatCompletion.getChat();