fix: disable dall-e image generation w/o key
This commit is contained in:
1 parent
0221acd163
commit
fe7610d380
1 file changed
+3
@@ -165,6 +165,9 @@
|
|||||||
if (imageGenerationEngine === '' && AUTOMATIC1111_BASE_URL === '') {
|
if (imageGenerationEngine === '' && AUTOMATIC1111_BASE_URL === '') {
|
||||||
toast.error('AUTOMATIC1111 Base URL is required.');
|
toast.error('AUTOMATIC1111 Base URL is required.');
|
||||||
enableImageGeneration = false;
|
enableImageGeneration = false;
|
||||||
|
} else if (imageGenerationEngine === 'openai' && OPENAI_API_KEY === '') {
|
||||||
|
toast.error('OpenAI API Key is required.');
|
||||||
|
enableImageGeneration = false;
|
||||||
} else {
|
} else {
|
||||||
enableImageGeneration = !enableImageGeneration;
|
enableImageGeneration = !enableImageGeneration;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user