跳到正文
Simon Willison·· 6 小时前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 查看输出。

正文 · 原文

I'm working towards a new LLM release, and testing PRs caused me to revisit the llm-echo debug plugin. This plugin provides a "model" which doesn't involve an LLM at all - it just repeats back the prompts that have been fed to it. The new release now updates the simulated token usage counts to take tool calls, system prompts, and reasoning tokens into account.

Example usage:

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

Outputs:

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