fix: disable dall-e image generation w/o key

This commit is contained in:
Timothy J. Baek 2024-03-08 17:40:30 -08:00
parent 0221acd163
commit fe7610d380

View file

@ -165,6 +165,9 @@
if (imageGenerationEngine === '' && AUTOMATIC1111_BASE_URL === '') {
toast.error('AUTOMATIC1111 Base URL is required.');
enableImageGeneration = false;
} else if (imageGenerationEngine === 'openai' && OPENAI_API_KEY === '') {
toast.error('OpenAI API Key is required.');
enableImageGeneration = false;
} else {
enableImageGeneration = !enableImageGeneration;
}