Skip to main content

A package to count tokens in input text using OpenAI's tiktoken library.

Project description

gptwc: wc for GPT tokens

A simple utility for counting tokens. Uses tiktoken

Example Usage:

cat logs.txt | gptwc

gptwc < input.txt

Prints the number of tokens in the input stdin text, similar to how wc prints the number of words.

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

gptwc-1.0.0.tar.gz (1.8 kB view hashes)

Uploaded Source

Built Distribution

gptwc-1.0.0-py3-none-any.whl (2.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page