Reduce the size of GPT inputs by 40-60% without losing most of the information.
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file gptrim-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: gptrim-0.1.6-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbe6990a352a6cbcd0115ab9c7a50f63c70191943e2739ee511877e86e314659 |
|
MD5 | 361f61f1ff8fb52290a9f49b2867e263 |
|
BLAKE2b-256 | f1f803c79b53e31188ccaa9b3b87233d7c7f82d49eccbc0d2eb460d1db8f3231 |