mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix prompt-manager being rendered twice.
This commit is contained in:
@ -2810,7 +2810,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||||||
quietPrompt: quiet_prompt,
|
quietPrompt: quiet_prompt,
|
||||||
jailbreakPrompt: jailbreakPrompt,
|
jailbreakPrompt: jailbreakPrompt,
|
||||||
cyclePrompt: cyclePrompt,
|
cyclePrompt: cyclePrompt,
|
||||||
});
|
}, dryRun);
|
||||||
generate_data = { prompt: prompt };
|
generate_data = { prompt: prompt };
|
||||||
|
|
||||||
// counts will return false if the user has not enabled the token breakdown feature
|
// counts will return false if the user has not enabled the token breakdown feature
|
||||||
|
@ -590,7 +590,7 @@ function prepareOpenAIMessages({
|
|||||||
quietPrompt,
|
quietPrompt,
|
||||||
extensionPrompts,
|
extensionPrompts,
|
||||||
cyclePrompt
|
cyclePrompt
|
||||||
} = {}) {
|
} = {}, dryRun) {
|
||||||
const prompts = promptManager.getPromptCollection();
|
const prompts = promptManager.getPromptCollection();
|
||||||
const chatCompletion = new ChatCompletion();
|
const chatCompletion = new ChatCompletion();
|
||||||
const userSettings = promptManager.serviceSettings;
|
const userSettings = promptManager.serviceSettings;
|
||||||
@ -671,7 +671,7 @@ function prepareOpenAIMessages({
|
|||||||
promptManager.populateTokenHandler(chatCompletion.getMessages());
|
promptManager.populateTokenHandler(chatCompletion.getMessages());
|
||||||
|
|
||||||
// All information are up-to-date, render without dry-run.
|
// All information are up-to-date, render without dry-run.
|
||||||
promptManager.render(false);
|
if (false === dryRun) promptManager.render(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const chat = chatCompletion.getChat();
|
const chat = chatCompletion.getChat();
|
||||||
|
Reference in New Issue
Block a user