跳到正文
Simon Willison·· 5 小时前AI 评分35

llm-echo 0.5 发布

llm-echo 0.5

AI 导读

Simon Willison 更新了 LLM 的调试插件 llm-echo,该插件模拟一个完全复述输入提示词的"模型",不调用任何 LLM。新版本在模拟 token 用量统计中纳入了 tool calls、system prompt 和 reasoning tokens,可通过 uvx 运行并配合 -o thinking 1 --usage 查看输出。

正文 · AI 翻译

我正在筹备一个新的 LLM 发布,测试 PR 的过程中让我重新审视了 llm-echo 调试插件。这个插件提供了一个完全不涉及 LLM 的“模型”——它只是把喂给它的提示词原样重复输出。新版本现在更新了模拟的 token 用量计数,将工具调用、系统提示词和推理 token 都纳入考虑。

用法示例:

uvx --with llm-echo llm -m echo 'hi there' -o thinking 1 --usage

输出:

First I consider the prompt, then I decide what to say.
{
  "prompt": "hi there",
  "system": "",
  "attachments": [],
  "stream": true,
  "previous": []
}
Token usage: 2 input, 24 output

来源: Simon Willison · simonwillison.net