A sleek desktop application for AI-assisted writing powered by Ollama and built with PyQt5. Let your local LLM continue your stories, articles, or documents seamlessly.
- π€ AI Text Completion - Continue your writing with local LLM models via Ollama
- π¨ Light/Dark Theme - Toggle between beautiful light and dark modes
- π‘οΈ Temperature Control - Adjust creativity vs. focus (0.0 - 2.0)
- π Token Limit - Control response length (10 - 2000 tokens)
- π Model Selection - Choose from all your installed Ollama models
- πΎ Multiple Export Formats - Save as .txt or .docx (Word)
- π₯οΈ Modern UI - Clean, responsive interface with sidebar controls
- Python 3.8+
- Ollama installed and running locally
- Operating System: Windows, macOS, or Linux
PyQt5>=5.15.0
requests>=2.28.0
python-docx>=0.8.11 # Optional, for .docx support
First, ensure Ollama is installed and running on your system:
Windows/macOS:
# Download from https://ollama.ai
# Then pull a model
ollama pull thewindmom/hermes-3-llama-3.1-8bLinux:
curl -fsSL https://ollama.ai/install.sh | sh
ollama pull thewindmom/hermes-3-llama-3.1-8bgit clone https://github.com/Laszlobeer/AI-Writer.git
cd ai-writerpython -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activatepip install -r requirements.txtOr install manually:
pip install PyQt5 requests python-docxpython ai writer.py- Select a Model - Click the model dropdown and choose an installed Ollama model
- Write Your Text - Start typing in the editor
- Click Generate - Press the β¨ Generate button or use keyboard shortcut
- Save Your Work - Export as .txt or .docx
| Control | Description |
|---|---|
| π/βοΈ | Toggle Light/Dark theme |
| π | Refresh available models |
| β¨ Generate | Trigger AI completion |
| π Save .txt | Export as text file |
| π Save .docx | Export as Word document |
| π‘οΈ Temperature | Adjust creativity (left=focused, right=creative) |
| π Token Limit | Set maximum response length |
| Setting | Default Value | Description |
|---|---|---|
| Temperature | 0.7 | Balance between creativity and coherence |
| Token Limit | 2000 | Maximum tokens in AI response |
| Ollama URL | http://localhost:11434 | Local Ollama server endpoint |
You can modify default values in the source code (ai_writer.py):
# In ai_writer.py
OLLAMA_URL = "http://localhost:11434"
DEFAULT_TOKEN_LIMIT = 140
DEFAULT_TEMPERATURE = 0.7- 0.0 - 0.5 π― Focused, deterministic output
- 0.5 - 1.0 βοΈ Balanced creativity and coherence
- 1.0 - 2.0 π¨ Highly creative, unpredictable output
Cannot connect to Ollama. Is it running?
Solution: Ensure Ollama service is running:
ollama serveNo models available
Solution: Pull a model:
ollama run thewindmom/hermes-3-llama-3.1-8binstall python-docx for .docx
Solution: Install the package:
pip install python-docxThis project is licensed under the MIT License - see the LICENSE file for details.
