
gittech. site
for different kinds of informations and explorations.
Local Ollama Chat β Chrome Extension
Published at
Jan 16, 2025
Overlay
A Chrome extension that enhances your browsing experience with AI-powered assistance.
Features
Core Features
- β Chrome Manifest V3 compatible
- β Dark/Light theme support
- β Sidepanel integration for easy access
- β Responsive and modern UI design
AI Integration
- β
Intelligent chat interface with multiple model support
- Gemini Pro integration with API key
- Local model execution via Ollama
- Automatic model switching and persistence
- β
Custom model configuration
- Default model selection in options
- Dynamic model discovery for both Gemini and Ollama
- Automatic retry mechanism for API rate limits
- β
Context-aware browsing assistance
- Interactive and conversational modes
- Context menu integration for quick actions
- π Chat history and conversation management
Content Features
- β Inspirational quotes on new tab
- β Quote categorization and attribution
- π§ Customizable new tab layout
- π Task management
Privacy & Security
- β Local model execution via Ollama
- β No data collection or tracking
Getting Started
- Install dependencies:
pnpm install
Configure AI Models:
a. For Ollama (Local Models):
# Install recommended models ollama pull mistral # Great for general tasks ollama pull codellama # Specialized for code ollama pull phi # Fast and lightweight
b. For Gemini (Cloud Models):
- Get your API key from Google AI Studio
- Add the key in the extension options
Start Ollama service with Chrome extension permissions:
OLLAMA_ORIGINS=chrome-extension://* ollama serve
Note: The extension will automatically discover available models from both Ollama and Gemini.
- Start development:
pnpm dev
- Build for production:
pnpm build
Development
Project Structure
overlay2/
βββ chrome-extension/ # Chrome extension core
βββ packages/ # Shared packages
βββ pages/ # Extension pages
βββ content/ # Content scripts
βββ popup/ # Popup UI
βββ side-panel/ # Sidepanel UI
Commands
pnpm dev
- Start development serverpnpm build
- Build for productionpnpm lint
- Run lintingpnpm test
- Run tests
Installation
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" in the top right
- Click "Load unpacked" and select the
dist
directory from this project
Requirements
- Node.js >= 16
- pnpm
- Chrome browser
Based on
License
MIT