llm-typesafe 0.1a0:为 LLM CLI 增加 Jev 模型支持
Simon Willison4 天前
概览
llm-typesafe 0.1a0 是一个面向 LLM 命令行工具的新插件,用于增加对 TypeSafe AI 新模型 Jev 的支持。
安装方式:
llm install llm-typesafe
设置 API Key:
llm keys set typesafe
# 粘贴 key
用法示例
1. 是/否类问题
可以向 Jev 提出 yes/no 类型的 “noul” 问题,例如判断一条消息是否明确要求退款:
llm -m jev 'Please refund my last payment.' \
-s 'Does this message explicitly request a refund?'
输出示例:
{"type": "noul", "noul": 0.99}
2. 多选分类问题
也可以让模型在多个选项中进行分类,例如根据用户消息判断应由哪个团队处理:
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"
}'
3. 评分类问题
还可以使用评分模式,例如评估问题报告的可复现程度:
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"
]'
适用场景
从示例来看,这个插件更偏向结构化判断任务,例如:
- 判断文本是否包含明确意图;
- 将消息路由到不同处理团队;
- 按预设标准给文本或报告打分。
对于已经在使用 LLM CLI 的开发者来说,llm-typesafe 提供了一种通过命令行调用 Jev 模型的方式。
