Do not attempt a dryrun if no character has been selected
This commit is contained in:
parent
82a11316bc
commit
cf305c0395
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue