proxycache

(★ 53)

Smart OpenAI‑compatible proxy for llama.cpp: manages slots, saves/restores KV cache to disk, routes requests by prefix similarity, and protects hot slots from being overwritten. Accelerates long prompts (30–60k tokens) via instant reuse or fast on‑demand restore; supports SSE streaming and non‑stream JSON over /v1/chat/completions.

  • .gitignore
  • app.py
  • config.py
  • hashing.py
  • llama_client.py
  • proxycache.py
  • README.md
  • readme_RU.md
  • requirements.txt
  • slot_manager.py

# Installation Guide

1. Get the code
git clone https://github.com/airnsk/proxycache

Downloads the entire project code from GitHub to your computer.

cd proxycache

Moves into the project folder you just downloaded.

2. Python

Easy Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Python 3 On Windows, be sure to check 'Add Python to PATH' during installation.
python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt

Installs the Python libraries listed in requirements.txt (or similar).

If it runs without errors and prints output in the terminal, it worked.

Pulled directly from this repo's README.

// repository documentation