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.

Plasmate Chat Screenshot

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

  1. Install dependencies
pip install -r requirements.txt
  1. Set your OpenAI API key
export OPENAI_API_KEY=sk-...
  1. Run the app
streamlit run app.py
  1. 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
  1. User enters a URL
  2. Plasmate fetches the page and extracts structured content
  3. LlamaIndex creates a vector index from the content
  4. User asks questions in natural language
  5. LlamaIndex retrieves relevant context
  6. 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

  1. Fork this repo or push to your GitHub
  2. Go to share.streamlit.io
  3. Connect your GitHub account
  4. Select this repo and app.py
  5. Add your OPENAI_API_KEY in Settings โ†’ Secrets
  6. 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 VariableDescriptionRequired
OPENAI_API_KEYYour OpenAI API keyYes

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