From b2b007699b2a42ed86970f59d597034679265e91 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 16 Jul 2025 23:24:39 +0300 Subject: Remove Pixabay and Unsplash image search support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- internal/gui/app.go | 2 -- internal/gui/generator.go | 15 +-------------- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'internal/gui') 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: -- cgit v1.2.3