跳到正文
Simon Willison·· 2026-10-09

ttok 0.4

ttok 0.4

中文摘要

发布:ttok 0.4 ttok 是我用于统计 token 的 CLI 工具,使用了 OpenAI 的开源 tiktoken 库。它已经有几年没有更新了,但我终于修复了一个 Click 警告,更新了 CI,并添加了一个 --list-models 命令来列出可用的模型。它与 uvx 兼容,因此你可以像这样在任何东西中统计 token:cat file.txt | uvx ttok 标签:项目,人工智能,OpenAI,生成式人工智能,大语言模型,分词

英文原文

Release: ttok 0.4 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 Tags: projects , ai , openai , generative-ai , llms , tokenization

应来源方要求,这里只提供摘要与原文入口。完整内容请阅读原文。

来源:Simon Willison · simonwillison.net