ai-typing-assistant  by patrickloeber

Local typing assistant powered by Ollama

created 1 year ago
314 stars

Top 87.1% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a lightweight, AI-powered local typing assistant designed to correct typos and improve text quality using a local Large Language Model (LLM) via Ollama. It's ideal for users who want to enhance their typing speed and accuracy by offloading text correction to an LLM without relying on cloud services.

How It Works

The assistant runs as a background script, monitoring global hotkeys. Upon activation, it captures the current line or selected text, sends it to a locally running Ollama model (e.g., Mistral 7B Instruct) with a specific prompt for text correction, and then replaces the original text with the LLM's output. This approach leverages the LLM's natural language understanding for efficient and context-aware text refinement.

Quick Start & Requirements

  • Install Ollama: Follow instructions at https://github.com/ollama/ollama. Run ollama run mistral:7b-instruct-v0.2-q4_K_S.
  • Install Dependencies: pip install pynput pyperclip httpx
  • Run Assistant: python main.py
  • Prerequisites: Ollama installed and a compatible LLM model downloaded. macOS is confirmed to work; Linux/Windows may require hotkey adjustments (e.g., Key.cmd to Key.ctrl).

Highlighted Details

  • Operates locally, ensuring data privacy.
  • Minimalist design, under 100 lines of Python code.
  • Customizable hotkeys (F9 for current line, F10 for selection) and prompt templates.
  • Supports text fixing, generation, and summarization via different prompt templates.

Maintenance & Community

The project is a personal project by Patrick Loeber, with a demo and explanations available on his YouTube channel. Community interaction channels are not specified.

Licensing & Compatibility

The repository does not explicitly state a license. Compatibility for commercial use or linking with closed-source projects is not specified.

Limitations & Caveats

macOS-specific hotkey configurations might require manual adjustments for Linux and Windows. Initial setup on macOS may require granting accessibility and input monitoring permissions to the script's execution environment.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
7 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.