Plasmate Chat
April 11, 2026 ยท View on GitHub
Chat with any website using RAG. Enter a URL, ask questions, get answers grounded in page content.

What it does
Plasmate Chat combines three powerful tools:
- Plasmate - Fetches web pages and converts HTML to a semantic model (16x fewer tokens than raw HTML)
- LlamaIndex - Creates a vector index for efficient retrieval
- OpenAI - Powers embeddings and conversational AI
The result: intelligent conversations about any webpage, with answers grounded in actual page content.
Quick Start
- Install dependencies
pip install -r requirements.txt
- Set your OpenAI API key
export OPENAI_API_KEY=sk-...
- Run the app
streamlit run app.py
- Open in browser at http://localhost:8501
How it works
URL Input
|
v
Plasmate Fetch -----> HTML to Semantic Model (16x compression)
|
v
LlamaIndex Index ---> Vector embeddings for retrieval
|
v
Chat Interface -----> RAG-powered Q&A with OpenAI
- User enters a URL
- Plasmate fetches the page and extracts structured content
- LlamaIndex creates a vector index from the content
- User asks questions in natural language
- LlamaIndex retrieves relevant context
- OpenAI generates answers grounded in the page content
Example Questions
Try loading a webpage and asking:
- "What is this page about?"
- "Summarize the main points"
- "What are the key features mentioned?"
- "Who is the author?"
- "What are the pricing options?"
- "List all the links on this page"
- "What technology stack is mentioned?"
Deploy to Streamlit Cloud
- Fork this repo or push to your GitHub
- Go to share.streamlit.io
- Connect your GitHub account
- Select this repo and
app.py - Add your
OPENAI_API_KEYin Settings โ Secrets - Deploy!
Live demo: plasmate-chat.streamlit.app
Docker
Run with Docker for easy deployment:
docker build -t plasmate-chat .
docker run -p 8501:8501 -e OPENAI_API_KEY=sk-... plasmate-chat
Configuration
| Environment Variable | Description | Required |
|---|---|---|
OPENAI_API_KEY | Your OpenAI API key | Yes |
Project Structure
plasmate-chat/
app.py # Streamlit application
requirements.txt # Python dependencies
Dockerfile # Container configuration
.env.example # Example environment variables
.streamlit/
config.toml # Streamlit theme configuration
License
MIT