A lightweight pre-processor to minimize LLM token usage
Project description
💻 TokenSaver
A lightweight Python library to minimize LLM token usage before sending prompts to GPT, Claude, Mistral, etc.
✨ Features
- Text Cleaning → collapse whitespace, normalize newlines.
- JSON Minify → compact JSON to reduce tokens.
- Entity Compression → replace long repeated names with short placeholders.
Installation
pip install tokensaver
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tokensaver-0.1.0.tar.gz
(3.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tokensaver-0.1.0.tar.gz.
File metadata
- Download URL: tokensaver-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
425a38aebe362f7b86c2a26cd4a4981e34c6b95df81a778690bb11b78b0f7c39
|
|
| MD5 |
ff27d1937855964cb87f96ab84c9170a
|
|
| BLAKE2b-256 |
70d49fcc6d87207a5d551cc45aa735e8c93b4abf2d10274257060a00427ab211
|
File details
Details for the file tokensaver-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tokensaver-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc8ed3a8321d45b2576f3ad9fae47248ec002ea6cea2d64b7465c903fd10eb34
|
|
| MD5 |
d5086951267323e9b6deb0e82ac64a79
|
|
| BLAKE2b-256 |
bd740b5ff62e30109d33d547cffde4517f734eeb3f97dac9ceb02f379315820a
|