STORY · VERKTOY_

ttok 0.4: counts and truncates text based on tokens

Simon Willison has released version 0.4 of ttok, his command-line tool for counting tokens with OpenAI's open source library tiktoken. The update fixes a Click warning, updates CI and adds the --list-models command to list available models. The tool can be run with uvx, for example by piping a file through cat and uvx ttok.

WHY IT MATTERS

Token counting is a practical part of working with language models, including for staying within context limits and costs. The tool is a minor update, but important for developers who use tiktoken in their daily work.

SOURCES

MACHINE-GENERATED SUMMARY This summary is written by machine from the sources below. We sort and explain — but we are a way into the field, not the final word. Check the source when something matters to you.