Prompt compression in Python
Project description
steno-python
Usage
The most basic usage. Call the steno.compress function on your prompt. Get back a
shorter, functionally equilvalent version.
import steno
prompt = "You crossed the line. People trusted you and they died. You gotta go down."
print(steno.compress(prompt))
You crossed line. People trusted you, died. Go down.
********************************************************************************
Original text: 17 tokens
Compressed text: 13 tokens
Compression: 23.53%
Compression took 615.38 ms
Use the <literal> tag to specify content you do not want modified.
import steno
prompt = """
Yeah <literal>(You can't touch this)</literal>
Look, man <literal>(You can't touch this)</literal>
You better get hype, boy, because you know you can't <literal>(You can't touch this)</literal>
"""
print(steno.compress(prompt))
Yeah. (You can't touch this) (You can't touch this)
Look man. (You can't touch this) You better get hype, know you.
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
steno_engine-0.1.1.tar.gz
(7.8 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 steno_engine-0.1.1.tar.gz.
File metadata
- Download URL: steno_engine-0.1.1.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28ef677391180e1f9d4cf78c10f4ff4eea77ddcbba0ba7858aa769977f9de460
|
|
| MD5 |
75be1b5cb1517f95519e961a7d9e6f60
|
|
| BLAKE2b-256 |
e8a9687b8eb7eb1186e6eb661ed3ce96050a3c58f70facd07229bdb71f204617
|
File details
Details for the file steno_engine-0.1.1-py3-none-any.whl.
File metadata
- Download URL: steno_engine-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64ea790f168182941e619b3405993c64ca196bd3154b9291250ea8e460aca39b
|
|
| MD5 |
341cb243b43cea8c62d4ff5c60213279
|
|
| BLAKE2b-256 |
ce27d1cad76846c380dec017823162416dd08472ffb26870be5d7aff69562941
|