forked from open-webui/open-webui
fix: disable dall-e image generation w/o key
This commit is contained in:
parent
0221acd163
commit
fe7610d380
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue