diff --git a/src/lib/components/chat/Settings/Images.svelte b/src/lib/components/chat/Settings/Images.svelte index 44430f110..38d365a43 100644 --- a/src/lib/components/chat/Settings/Images.svelte +++ b/src/lib/components/chat/Settings/Images.svelte @@ -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; }