mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Do not attempt a dryrun if no character has been selected
This commit is contained in:
@ -635,6 +635,9 @@ function prepareOpenAIMessages({
|
|||||||
extensionPrompts,
|
extensionPrompts,
|
||||||
cyclePrompt
|
cyclePrompt
|
||||||
} = {}, dryRun) {
|
} = {}, dryRun) {
|
||||||
|
// When there is no character selected, there is no way to accurately calculate tokens
|
||||||
|
if (!promptManager.activeCharacter && dryRun) return [null, false];
|
||||||
|
|
||||||
const prompts = promptManager.getPromptCollection();
|
const prompts = promptManager.getPromptCollection();
|
||||||
const chatCompletion = new ChatCompletion();
|
const chatCompletion = new ChatCompletion();
|
||||||
const userSettings = promptManager.serviceSettings;
|
const userSettings = promptManager.serviceSettings;
|
||||||
|
Reference in New Issue
Block a user