Don't render manager on non-chat completion APIs

This commit is contained in:
Cohee 2023-08-13 18:47:07 +03:00
parent 980c65b6cf
commit 43089ee06f
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import {callPopup, event_types, eventSource, substituteParams} from "../script.js";
import {callPopup, event_types, eventSource, main_api, substituteParams} from "../script.js";
import {TokenHandler} from "./openai.js";
import {power_user} from "./power-user.js";
import { debounce } from "./utils.js";
@ -582,6 +582,8 @@ PromptManagerModule.prototype.init = function (moduleConfiguration, serviceSetti
* @param afterTryGenerate - Whether a dry run should be attempted before rendering
*/
PromptManagerModule.prototype.render = function (afterTryGenerate = true) {
if (main_api !== 'openai') return;
if (null === this.activeCharacter) return;
this.error = null;