A Chrome extension that provides an AI-powered chat interface for any website. The assistant can scrape the current site's content and use it to provide contextually relevant answers to your questions.
- 🤖 AI-powered chat interface using GPT-4
- 📝 Real-time website content scraping
- 🔍 Context-aware responses based on the current website
- 💨 Fast and lightweight
- 🎯 Domain-specific responses (only uses content from the current site)
- 💬 Streaming responses with typing indicators
extension-chatbot/
├── extension/ # Chrome Extension
│ ├── content.js # Main extension logic
│ └── manifest.json # Extension manifest
└── server/ # Backend Server
├── src/
│ ├── index.ts # Main server file
│ └── lib/ # Server utilities
│ └── vectorStore.ts # Vector storage for embeddings
├── .env # Environment variables
└── package.json # Server dependencies
- Node.js (v20 or later)
- OpenAI API Key
- Neon PostgreSQL Database
-
Navigate to the server directory:
cd server
-
Install dependencies:
npm install
-
Create a
.env
file with your credentials:OPENAI_API_KEY=your_openai_api_key POSTGRES_URL=your_neon_postgres_url
-
Start the server:
npm run dev
- Open Chrome and go to
chrome://extensions/
- Enable "Developer mode"
- Click "Load unpacked"
- Select the
extension
directory
- Click the extension icon in your browser
- Click "Scrape Site" to analyze the current webpage
- Ask questions about the website's content
- Get AI-powered responses based on the scraped content
- Uses OpenAI's GPT-4 for generating responses
- Implements vector similarity search for relevant context retrieval
- Stores embeddings in a Neon PostgreSQL database
- Uses streaming responses for a better user experience
OPENAI_API_KEY
: Your OpenAI API keyPOSTGRES_URL
: Your Neon PostgreSQL connection string
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
MIT License - feel free to use this project for any purpose.