sbusso / gptrim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gptrim

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)

About

License:MIT License


Languages

Language:Python 100.0%