gptrim is a Python library designed to help you trim text inputs, making it easier to fit more content within GPT’s context window. By tokenizing, stemming, and removing spaces, this library prepares your text inputs for efficient processing with GPT models.
Installation
pip install gptrim
Usage
from gptrim import trim
text = "This is an example sentence to demonstrate gptrim usage."
trimmed_text = trim(text)
print(trimmed_text)
Metadata
Release files for gptrim 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gptrim-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Release files / gptrim-0.1.6-py3-none-any.whl
| Download URL | gptrim-0.1.6-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbe6990a352a6cbcd0115ab9c7a50f63c70191943e2739ee511877e86e314659
|
|
BLAKE2b-256 checksum How to use checksums |
f1f803c79b53e31188ccaa9b3b87233d7c7f82d49eccbc0d2eb460d1db8f3231
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.5
|