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 Distribution
gptrim-0.1.2.tar.gz
(3.3 kB
view hashes)
Built Distribution
gptrim-0.1.2-py3-none-any.whl
(3.5 kB
view hashes)