Skip to content

Repository files navigation

Jiji

A desktop AI pet — a small, persistent companion app that lives on your screen, understands what you're asking for, and can read your screen to help with coding and everyday tasks.

Overview

Jiji is a PyQt5 desktop application backed by local LLMs (via Ollama), designed to feel more like a lightweight assistant living alongside your workflow than a chat window you have to open. It routes incoming requests to the right kind of response (chat, code, screen-reading) rather than treating every message the same way.

Tech Stack

  • UI: Python, PyQt5
  • LLM runtime: Ollama, running local Qwen models
    • qwen3:8b — general chat
    • qwen2.5-coder:7b — code generation
  • Screen reading: OCR

Features

  • Intent routing — classifies incoming requests so chat, coding, and screen-reading queries get handled by the appropriate model/pipeline instead of a single generic prompt
  • Chat bubble UI — lightweight, persistent on-screen presence rather than a full app window
  • OCR screen reading — Jiji can read what's currently on screen to answer questions about it or assist with what you're working on
  • Style-guided code generation — a jiji_codestyle.md file is injected into code generation prompts so output matches a consistent style rather than generic LLM defaults

Architecture Notes

  • Two-model split: a general chat model and a dedicated coder model, selected based on routed intent, rather than one model doing everything.
  • Code style consistency is handled via prompt injection (jiji_codestyle.md) rather than post-hoc formatting/linting.

System Design

Request flow:

  1. User types a message into the chat bubble UI (PyQt5).
  2. An intent classification step inspects the message and routes it to one of: general chat, code generation, or screen-reading.
  3. Chat path: message goes to qwen3:8b via Ollama's local API, response streamed back into the bubble.
  4. Code path: message is wrapped with the contents of jiji_codestyle.md as a style guide, then sent to qwen2.5-coder:7b.
  5. Screen-read path: a screenshot is captured, OCR extracts text, the extracted text is combined with the user's query and passed to the chat model for interpretation.

Why two models instead of one: qwen2.5-coder:7b is coder-specialized, so code output is measurably better-structured than asking a general chat model to write code — at the cost of running two model weights locally instead of one.

Why local (Ollama) instead of API-based: no per-token cost, no network dependency, and it fits the "AI pet" framing of a companion that lives entirely on your machine rather than phoning home.

Style consistency approach: rather than linting/reformatting generated code after the fact, jiji_codestyle.md is injected directly into the coder model's system/context prompt, so style constraints shape the generation itself.

Tech Stats

Metric Value
Chat model size / quantization qwen3:8b — confirm quantization (e.g. Q4_K_M)
Coder model size / quantization qwen2.5-coder:7b — confirm quantization

Running Locally

# Install Ollama and pull the models
ollama pull qwen3:8b
ollama pull qwen2.5-coder:7b

# Install Python dependencies
pip install -r requirements.txt

# Run
python main.py

Status

Ongoing side experiment — actively developed, not yet packaged for distribution.

About

Jiji is a sophisticated, locally-hosted desktop companion designed to act as your personal productivity and coding assistant. At its core, she is a PyQt-based pixel art application that runs as an always-on-top, transparent overlay, blending seamlessly into your workspace.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages