mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 13:40:55 +00:00
fix: disable dall-e image generation w/o key
This commit is contained in:
parent
0221acd163
commit
fe7610d380
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user