跳到主内容
@wquguru
精选75Simon Willison 博客(RSS)技巧与观点

llm CLI 0.33 发布:支持模板组合与推理摘要

llm 0.33

原文
发到 X

Release: llm 0.33

发布:llm 0.33

My highlights from this release:

本次发布的亮点:

  • Upgraded to the OpenAI Python library 3.x and switched the HTTP client dependency from httpx to httpx2. #1608, #1631
  • 升级至 OpenAI Python 库 3.x,并将 HTTP 客户端依赖从 httpx 切换为 httpx2。#1608, #1631

I shipped a quick 0.32.1 fix for this yesterday, but this is the more comprehensive fix.

我昨天发布了一个快速的 0.32.1 修复版本,但这是更全面的修复方案。

  • llm embed and llm embed-multi now accept --key. The Python EmbeddingModel.embed(), EmbeddingModel.embed_multi(), Collection.embed() and Collection.embed_multi() methods accept key= too, passing the resolved per-call key to embedding plugins without changing shared model state. Existing plugins that read self.key continue to work through a compatibility fallback. Thanks, ChrisJr404. #757, #1620
  • llm embed 和 llm embed-multi 现在接受 --key 参数。Python 的 EmbeddingModel.embed()、EmbeddingModel.embed_multi()、Collection.embed() 和 Collection.embed_multi() 方法也接受 key= 参数,将解析后的每次调用密钥传递给嵌入插件,而不改变共享模型状态。继续读取 self.key 的现有插件通过兼容性回退机制继续工作。感谢 ChrisJr404。#757, #1620

The embedding models now use the same pattern for keys that regular LLM models do.

嵌入模型现在使用与常规 LLM 模型相同的密钥模式。

  • llm prompt -t/--template can now be repeated to combine templates in order. This allows model configuration and options from one template to be used with a prompt from another.
  • llm prompt -t/--template 现在可以重复使用以按顺序组合模板。这允许将一个模板中的模型配置和选项与另一个模板中的提示词一起使用。

This unlocks a neat pattern where you can create templates that package a model with a set of default options:

这解锁了一种简洁的模式,你可以创建将模型与一组默认选项打包在一起的模板:

代码 · 4
llm -m gpt-5.6-luna -o reasoning_effort high --save lhigh
llm "Generate an SVG of a pelican riding a bicycle" --save pelican
# Combine and run the templates
llm -t lhigh -t pelican
代码 · 4
llm -m gpt-5.6-luna -o reasoning_effort high --save lhigh
llm "Generate an SVG of a pelican riding a bicycle" --save pelican
# Combine and run the templates
llm -t lhigh -t pelican
  • Reasoning-capable Responses API models now support a reasoning_summary option with auto, concise, and detailed values. This can be used with llm openai endpoint --responses. #1600
  • 具备推理能力的 Responses API 模型现在支持 reasoning_summary 选项,其值包括 auto、concise 和 detailed。这可以与 llm openai endpoint --responses 一起使用。#1600

This is particularly useful for exercising different models that provide their own imitation of the OpenAI Responses API.

这对于测试提供自身对 OpenAI Responses API 模拟的不同模型特别有用。

Tags: annotated-release-notes, llm

标签:annotated-release-notes, llm

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

另一事件,读法相近