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.0.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.0.tar.gz.
File metadata
- Download URL: steno_engine-0.1.0.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 |
9c9e563a5cf2cae14e5b42c666bf8208a1e64ca77cef0308f298b8906e6dfa82
|
|
| MD5 |
bc1a27b6f69d908118451f9ff5d04bab
|
|
| BLAKE2b-256 |
0695a44d8c76be62dd7e3934e3a5d6bfe8138eb3e67abb4f3e0fc5928dce9ecf
|
File details
Details for the file steno_engine-0.1.0-py3-none-any.whl.
File metadata
- Download URL: steno_engine-0.1.0-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 |
e54570d019585972ac182e4aef2a5d5b8c11d2dabaa5933a8853834c51485bdf
|
|
| MD5 |
3c55bf722f38694b87e08782453f9dff
|
|
| BLAKE2b-256 |
3f1d55e7e8dd56aa8c00981cecfd9cffb42b856792af2339952710c2e0682c98
|