Skip to main content

Token-saving abbreviation compressor for OpenAI LLM prompts

Project description

abbrcompress

Token-saving abbreviation compression for OpenAI LLM prompts.

Install

pip install abbrcompress
uv pip install abbrcompress

## Usage

from abbrcompress import AbbrCompressor

compressor = AbbrCompressor()
abbrs, _ = compressor.build_abbreviations(text)
compressed = compressor.compress_prompt(text)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abbrcompress-0.1.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abbrcompress-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file abbrcompress-0.1.1.tar.gz.

File metadata

  • Download URL: abbrcompress-0.1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for abbrcompress-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f099cfc27196f078706598abe54ee9733d987919c6f664fffbafcca8e03b4ddc
MD5 37adae30bdaddf91f311d08e12841c79
BLAKE2b-256 2f49bc6b64ea1c5b2df8c59c5cdd6b20181e113b0b93c9bd272d0caa46573dc6

See more details on using hashes here.

File details

Details for the file abbrcompress-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: abbrcompress-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for abbrcompress-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12a0be33d1fd29894e4caa801ceb2773cf19b36788ec0fad0037e3b9034695d8
MD5 ffc8248f0b25b1809e6d44f6bed67188
BLAKE2b-256 1279d7cfa794215cd1422dfb67be58dafec3aebf2bc8d4e01a8a4319796b7a19

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page