Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

LocalFLLM (Local First LLM)

LocalFLLM is a powerful, high-performance, and 100% client-side web interface designed to interact with local Large Language Models (LLMs) via your own Ollama server or any compatible API endpoint.

The core philosophy of this project is Local First: all your chats, configurations, and contexts remain strictly on your machine. There are no middlemen, no external databases, and no installations required (no Docker, no Node.js, no backend setup). It is entirely contained within a single static HTML file.

🌟 Features

  • Zero Setup Required: It's just a pure static index.html file. You can run it directly from your hard drive or host it on GitHub Pages, Netlify, or any static hosting service.
  • Persistent History (IndexedDB): All your conversations are saved locally in your browser's IndexedDB. You won't lose your chats if you close or refresh the tab.
  • High-Performance Rendering: Engineered with an inline Web Worker for asynchronous Markdown parsing and a 20 FPS UI throttling system. It handles massive context windows and hyper-fast streaming speeds without freezing your browser (No Layout Thrashing).
  • Tool Calling (Function Calling): Full support for models that can execute functions. The UI transparently displays the AI's requested Action (parameters) and the System Tool response before delivering the final answer in a seamless loop.
  • Stop Generation: A built-in cancellation token (AbortController) allows you to stop the AI's generation mid-stream instantly.
  • Dynamic Configuration per Chat: Each conversation maintains its own configuration state. You can have one chat talking to a coding model with low temperature, and another chat using a creative model with high temperature.
  • Auto-Fetch Models: Automatically queries your local API (/api/tags) to provide a dropdown list of your installed models.
  • Secure Custom Auth Headers: Need to connect to a secured local API or a proxy? Set custom authorization headers (e.g., Bearer tokens). For security, this token is encrypted locally in your browser using AES encryption (CryptoJS) tied to your browser's fingerprint before being saved to IndexedDB.
  • Thinking Process Parser: For reasoning models (like DeepSeek or specialized Qwen models), the UI smoothly parses the <think> tags (or the structural thinking JSON property) into a collapsible box, keeping the chat clean.
  • Markdown & Code Highlighting: Full support for Markdown formatting, tables, and syntax highlighting for code blocks.

πŸš€ How to Use

  1. Get the file: Download the index.html file.
  2. Open it: Simply double-click the file to open it in your favorite modern web browser (Chrome, Firefox, Edge, Safari). Alternatively, access the hosted version if deployed on GitHub Pages.
  3. Configure your Server:
    • By default, it connects to a local Ollama instance running at http://127.0.0.1:11434/api/chat.
    • Important: If your Ollama server is running on a different port or IP, change the API URL in the "Chat Settings" panel.
  4. CORS Requirement: Since this runs in a browser, your Ollama server must allow Cross-Origin Resource Sharing (CORS).
    • To start Ollama with CORS enabled, use the following command in your terminal:
      OLLAMA_ORIGINS="*" ollama serve
  5. Start Chatting: Select your model name and start typing!

πŸ› οΈ Built With

  • HTML5/JS/CSS: Pure native web technologies.
  • Tailwind CSS: For the modern, responsive dark-mode user interface (via CDN).
  • Marked.js & DOMPurify: For safely rendering Markdown responses via Web Workers.
  • Highlight.js: For beautiful code block formatting.
  • CryptoJS: For local-first encryption of sensitive headers.
  • Lucide Icons: For the sleek UI iconography.

πŸ”’ Privacy Guarantee

This application makes no external requests other than fetching the CDN libraries for styling/parsing and the direct HTTP requests to your specified API URL (e.g., your local Ollama). No analytics, no tracking, and no cloud storage. Your data is yours.

Releases

Packages

Contributors

Languages