diff options
| author | Paul Buetow <paul@buetow.org> | 2025-07-16 23:24:39 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-07-16 23:24:39 +0300 |
| commit | b2b007699b2a42ed86970f59d597034679265e91 (patch) | |
| tree | 4c3167cdece1ee181f92bc1a14b0e17e00db7c0c /internal/gui | |
| parent | e2e75315e5e7c3eaccdc38881bd2fa669bb9dda5 (diff) | |
Remove Pixabay and Unsplash image search support
- Delete Pixabay and Unsplash implementation files
- Remove API key configuration for both services
- Update CLI and GUI to only support OpenAI DALL-E
- Update documentation to reflect OpenAI as sole image provider
- Fix tests to handle nil client in OpenAI implementation
- Simplify configuration examples
The application now exclusively uses OpenAI DALL-E for image generation,
providing AI-generated educational images with creative art styles.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'internal/gui')
| -rw-r--r-- | internal/gui/app.go | 2 | ||||
| -rw-r--r-- | internal/gui/generator.go | 15 |
2 files changed, 1 insertions, 16 deletions
diff --git a/internal/gui/app.go b/internal/gui/app.go index 3a8dd33..37c7b9d 100644 --- a/internal/gui/app.go +++ b/internal/gui/app.go @@ -83,8 +83,6 @@ type Config struct { ImageProvider string EnableCache bool OpenAIKey string - PixabayKey string - UnsplashKey string } // DefaultConfig returns default GUI configuration diff --git a/internal/gui/generator.go b/internal/gui/generator.go index 7a6d26e..86b7013 100644 --- a/internal/gui/generator.go +++ b/internal/gui/generator.go @@ -97,18 +97,6 @@ func (a *Application) generateImagesWithPrompt(word string, customPrompt string) var err error switch a.config.ImageProvider { - case "pixabay": - searcher = image.NewPixabayClient(a.config.PixabayKey) - - case "unsplash": - if a.config.UnsplashKey == "" { - return "", fmt.Errorf("Unsplash API key is required") - } - searcher, err = image.NewUnsplashClient(a.config.UnsplashKey) - if err != nil { - return "", err - } - case "openai": openaiConfig := &image.OpenAIConfig{ APIKey: a.config.OpenAIKey, @@ -122,8 +110,7 @@ func (a *Application) generateImagesWithPrompt(word string, customPrompt string) searcher = image.NewOpenAIClient(openaiConfig) if openaiConfig.APIKey == "" { - // Fall back to Pixabay - searcher = image.NewPixabayClient("") + return "", fmt.Errorf("OpenAI API key is required for image generation") } default: |
