Skip to main content

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)

Table of built distributions (wheels) for gptrim 0.1.6
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

2 release files

0.1.2

2 release files

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page