跳到正文
原文
Simon Willison·· 17 天前AI 评分52

llm-typesafe 0.1a0 发布,为 LLM 接入 TypeSafe AI 的 Jev 模型做类型安全判断

llm-typesafe 0.1a0

AI 导读

Simon Willison 发布 llm-typesafe 0.1a0 插件,为他的 LLM 命令行工具接入 TypeSafe AI 的 Jev 模型。通过 llm install llm-typesafe 安装并设置 API key 后,可用 -m jev 指令完成 yes/no 的 noul 判断、choice 选择和 score 评分三类类型安全结构化输出。

正文

I built this new plugin for LLM to add support for TypeSafe AI's new Jev model. Install it like this:

llm install llm-typesafe

Then set an API key (get one here, the waitlist seems to move pretty fast):

llm keys set typesafe
# Paste key

And now you can ask yes/no "noul" questions like this:

llm -m jev 'Please refund my last payment.' \
  -s 'Does this message explicitly request a refund?'

Output:

{"type": "noul", "noul": 0.99}

Or choice questions like this:

cat message.txt | llm -m jev \
  -s 'Which team should handle this message? If billing and technical issues both occur, choose billing.' \
  -o answer_type choice \
  -o criteria '{
    "billing":"Charges, invoices, payments, or refunds",
    "technical":"Problems installing or using the product",
    "other":"Neither category fits"
  }'

Or scoring questions like this:

cat report.txt | llm -m jev \
  -s 'How reproducible is the problem described in this report?' \
  -o answer_type score \
  -o criteria '[
    "No reproduction instructions",
    "Some instructions, but important steps are missing",
    "Complete steps with expected and actual results"
  ]'

See the README for more details.

来源:Simon Willison · simonwillison.net