feat: add Ollama local LLM support with optional API key - #7
Open
Dreichi wants to merge 1 commit into
Open
Conversation
- Add OllamaService for local AI inference with llmClient integration - Create unified llmClient.ts with automatic JSON forcing (format: 'json') - Update ConfigDialog with Ollama provider option and optional API key - Extend config store to support 'ollama' provider type - Add unifiedAIService factory for seamless provider switching - Update App.tsx to handle optional API key validation for Ollama - Add translation keys for Ollama-specific UI elements (EN/ZH) - Maintain backward compatibility with existing Gemini/OpenAI providers Closes #[issue-number]
SSShooter
requested changes
Sep 15, 2025
SSShooter
left a comment
Owner
There was a problem hiding this comment.
Most of the code in src/services/ollamaService.ts is duplicated with src/services/geminiService.ts. It should only be necessary to extend the functionality of geminiService.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Ollama Local LLM Support
🚀 Features
llmClient.tsfor consistent JSON formatting across providers🔧 Technical Implementation
OllamaService: Full-featured service with all AI operationsllmClient.ts: Unified client with automatic JSON forcing (format: "json"for Ollama)unifiedAIService.ts: Factory pattern for provider abstractionConfigDialogwith Ollama configuration options'ollama'provider type🌍 Internationalization
🎉 Benefits for Users
🔄 Backward Compatibility