Skip to content

Commit

Permalink
fix: disable dall-e image generation w/o key
Browse files Browse the repository at this point in the history
  • Loading branch information
tjbck committed Mar 9, 2024
1 parent 0221acd commit fe7610d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/components/chat/Settings/Images.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fe7610d

Please sign in to comment.