chrome & firefox extension to chat with webpages: local llms
JavaScript
132
27 commits
updated Dec 20, 2024
A browser extension that enables AI-powered chat interactions with webpage content using Hugging Face models.

To use the extension:
chrome://extensionsdist/chrome directory from the projectabout:debuggingdist/firefox directory and select manifest.jsonClick the extension icon and open settings. Configure the following:
You can also use a local llm server. I tried vLLM:
docker run --runtime nvidia --gpus 2 \
--name my_vllm_container \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HUGGING_FACE_HUB_TOKEN=hf_XXX" \
-p 8000:8000 \
--ipc=host \
vllm/vllm-openai:latest \
--model meta-llama/Llama-3.2-1B-Instruct --dtype=half
If you want to use an LLM from Hugging Face API Inference, you can use the following:
api url: `https://api-inference.huggingface.co/models/meta-llama/Llama-3.2-1B-Instruct`
token: your token which can be used for api inference
model: meta-llama/Llama-3.2-1B-Instruct
The above example is for Llama-3.2-1B-Instruct model. You can use any compatible model you want.
If you do not want to compile on your own, you can download the latest release from the Releases page. After that, skip to step 4.
git clone https://github.com/abhishekkrthakur/chat-ext.git
cd chat-ext
npm install
npm run build
chrome://extensionsdist directory from the projectnpm run dev - Watch mode for developmentnpm run build - Production buildnpm run test - Run testsnpm run lint - Lint codenpm run format - Format codechat-ext/
βββ src/
β βββ background.js # Extension background script
β βββ content.js # Content script for webpage interaction
β βββ client.js # API client
β βββ popup.js # UI logic
β βββ popup.html # Extension UI
βββ dist/ # Build output
βββ scripts/ # Build and utility scripts
Note: Some features may differ between browsers:
MIT License - See LICENSE file for details
Most of this extension code was generated by LLMs.
27 commits
JavaScript
49.4%
CSS
27.7%
HTML
22.9%
chrome & firefox extension to chat with webpages: local llms
JavaScript
132
27 commits
updated Dec 20, 2024
A browser extension that enables AI-powered chat interactions with webpage content using Hugging Face models.

To use the extension:
chrome://extensionsdist/chrome directory from the projectabout:debuggingdist/firefox directory and select manifest.jsonClick the extension icon and open settings. Configure the following:
You can also use a local llm server. I tried vLLM:
docker run --runtime nvidia --gpus 2 \
--name my_vllm_container \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HUGGING_FACE_HUB_TOKEN=hf_XXX" \
-p 8000:8000 \
--ipc=host \
vllm/vllm-openai:latest \
--model meta-llama/Llama-3.2-1B-Instruct --dtype=half
If you want to use an LLM from Hugging Face API Inference, you can use the following:
api url: `https://api-inference.huggingface.co/models/meta-llama/Llama-3.2-1B-Instruct`
token: your token which can be used for api inference
model: meta-llama/Llama-3.2-1B-Instruct
The above example is for Llama-3.2-1B-Instruct model. You can use any compatible model you want.
If you do not want to compile on your own, you can download the latest release from the Releases page. After that, skip to step 4.
git clone https://github.com/abhishekkrthakur/chat-ext.git
cd chat-ext
npm install
npm run build
chrome://extensionsdist directory from the projectnpm run dev - Watch mode for developmentnpm run build - Production buildnpm run test - Run testsnpm run lint - Lint codenpm run format - Format codechat-ext/
βββ src/
β βββ background.js # Extension background script
β βββ content.js # Content script for webpage interaction
β βββ client.js # API client
β βββ popup.js # UI logic
β βββ popup.html # Extension UI
βββ dist/ # Build output
βββ scripts/ # Build and utility scripts
Note: Some features may differ between browsers:
MIT License - See LICENSE file for details
Most of this extension code was generated by LLMs.
27 commits
JavaScript
49.4%
CSS
27.7%
HTML
22.9%