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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file gptwc-1.0.0.tar.gz.

File metadata

  • Download URL: gptwc-1.0.0.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for gptwc-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a8a1eef53de74113dd60abd22a2d46f9767f1f93b2f57a5222f93331c868fae5
MD5 c3950771c785def84dad748ae175ec98
BLAKE2b-256 de99a8d3a753cb26a66dd45a62784584e02da2c87adb6595f325e5aed5278afa

See more details on using hashes here.

File details

Details for the file gptwc-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gptwc-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for gptwc-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2bf6e2d7116abe562adc7ccd3d71e51ec90077b6f4d7cb24351a18d33f71e54a
MD5 c38c2158c344558747b438e6148af7e2
BLAKE2b-256 66400f0440fd5446aaacf4c7a5585bd39ae2f40eefb4be1afcb104ddb8d05ee3

See more details on using hashes here.

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