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

LLM-Echo 0.5 版本更新:模拟token使用计数功能增强

llm-echo 0.5

AI 导读

LLM-Echo 0.5版本更新,新增模拟token使用计数功能,考虑工具调用、系统提示和推理token,提升调试插件准确性。

原文

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