ttok 0.4

林知秋AI 前沿📡 Simon Willison's Weblog2026-10-091109 阅读💛 123 收藏

8th October 2026

Release ttok 0.4 — Count and truncate text based on tokens

ttok is my CLI tool for counting tokens, using OpenAI's open source tiktoken library.

It hasn't been in updated in a couple of years, but I finally fixed a Click warning, updated CI, and added a --list-models command to list available models.

It works with uvx, so you can count tokens in anything like this:

cat file.txt | uvx ttok

文章评论(0)

暂无评论,快来抢沙发~