Skip to content

gojira69/DeskChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeskChat — A Private Desktop AI Assistant for Your Documents

DeskChat is a fully local, privacy-first desktop chatbot that can understand and answer questions about your own files.

It runs entirely on your machine and combines:

  • A normal conversational chatbot
  • Retrieval-Augmented Generation (RAG) over your documents
  • A multi-agent reasoning pipeline (Answerer → Critic → Refiner)
  • Optional free web search (DuckDuckGo)
  • Built-in document tools (summaries, TOC, citation extraction)
  • A clean web UI built with Streamlit
  • Optional secure remote access via ngrok

Nothing is sent to any cloud AI service. All models run locally using Ollama.


What it can do

Core

  • Chat like a normal AI assistant
  • Upload PDFs, text, Word, CSV, JSON, HTML, images, and more
  • Ask questions about your own documents
  • Keep conversations local and private

Multi-Agent Mode

For harder questions, DeskChat can use multiple internal agents:

  1. Answerer — produces a first draft answer
  2. Critic — reviews it and points out issues
  3. Refiner — improves it into a final answer

This gives you more structured, higher-quality responses when needed.

Document Tools

  • Generate academic summaries of uploaded papers
  • Extract table-of-contents / section structure
  • Extract cited authors and references

Privacy & Control

  • Runs entirely on your machine
  • No cloud AI APIs
  • No telemetry or tracking
  • Optional web search using DuckDuckGo
  • Optional remote access via ngrok (with basic auth)
  • Automatic cleanup of old data

Architecture (high level)

You → Streamlit UI → Core Logic → Local Models (Ollama)
                           │
                           ├── Vector Store (Chroma)
                           ├── Document Loaders
                           ├── Multi-Agent Pipeline
                           └── Optional Web Search

Everything stays local unless you explicitly enable web search or remote access.


Project structure

deskchat/
│
├── app.py                  # Streamlit entry point
├── config.py               # Configuration & constants
├── requirements.txt
├── README.md
│
├── core/                   # All non-UI logic
│   ├── housekeeping.py     # Cleanup tasks
│   ├── session.py          # Session & chat persistence
│   ├── loaders.py          # File loading logic
│   ├── vectorstore.py      # Indexing and retrieval
│   ├── web.py              # DuckDuckGo search
│   ├── refiners.py         # Summaries, TOC, authors
│   ├── agents.py           # Multi-agent logic
│   ├── generation.py       # Single-agent RAG / chat
│   ├── ngrok.py            # Remote access helpers
│   └── utils.py            # Utility helpers
│
├── ui/                     # Streamlit UI components
│   ├── sidebar.py
│   ├── knowledge.py
│   └── chat.py
│
├── data/                   # Uploaded files
└── storage/
    ├── chats/              # Saved chat histories
    └── indexes/            # Vector indexes

Requirements

System

  • Python 3.10+
  • Ollama installed and running
  • 16GB RAM recommended (more for large models)
  • GPU recommended but optional

Python dependencies

pip install -r requirements.txt

Ollama models

Pull the models DeskChat uses:

ollama pull qwen3:8b
ollama pull qwen2.5:7b
ollama pull gemma2:9b
ollama pull starling-lm:7b-alpha
ollama pull mxbai-embed-large

Running DeskChat

streamlit run app.py

Then open:

http://localhost:8501

Optional: Remote access

If you want to access DeskChat from your phone or another device:

ngrok config add-authtoken YOUR_TOKEN

Then enable remote access inside the sidebar UI.

Basic authentication is enabled by default so random people cannot access it.


How to use it

Upload documents

  • Drag & drop files into the upload area
  • Click Build / Rebuild index

Chat modes

  • RAG — uses your documents as context
  • Plain Chat — normal chatbot, no documents
  • Multi-Agent — Answerer + Critic + Refiner pipeline

Document tools

For each uploaded file you can:

  • Generate a summary
  • Generate a table of contents
  • Extract cited authors

Data retention

By default:

  • Chats and indexes older than 10 days are deleted automatically
  • You can change this in config.py

Privacy

Data type Leaves your machine?
Chat messages No
Documents No
Embeddings No
Models No
Web queries Only if enabled
Remote access Only if enabled

Disclaimer

  • DeskChat does not include content moderation unless you add it.
  • Output quality and bias depend on the underlying models.
  • Intended for personal use, research, and experimentation.

Development

Run with live reload:

streamlit run app.py --server.runOnSave true

License

MIT — do whatever you want with it.

About

A fully local, privacy-first desktop chatbot that can understand and answer questions about your own files.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages