TypeSafe System One · Jev 调用文档
Jev 决策模型调用指南
结构化决策,不生成文字 · Choice(多选一)· Score(评分)· Noul(真值概率)
- 端点:
POST https://www.zhonghedingfu.com/v1/systemone - 模型:
model: "jev-latest"(始终指向最新版本) - API Key 分组:创建 Key 时选
typesafe分组 - Jev 不生成文字,只返回结构化决策结果
适用场景
从预设选项中选一个。适合路由分发、分类打标、团队指派等。最多 255 个选项。
返回:choice(选中项 key)、confidence(置信度 0-1)、probabilities(各选项概率)
curl 示例
bash
curl https://www.zhonghedingfu.com/v1/systemone \
-H "Authorization: Bearer sk-你的key" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-latest",
"state": "用户反馈:充值后余额没到账,已等待2小时",
"questions": {
"department": {
"type": "choice",
"instructions": "这条反馈应该转给哪个团队处理?",
"criteria": {
"billing": "与付款、充值、退款有关",
"technical": "程序错误、功能故障",
"operations": "账号封禁、政策咨询"
}
}
}
}'响应结构
json
{
"model": "jev-latest",
"answers": {
"department": {
"type": "choice",
"choice": "billing",
"confidence": 0.91,
"probabilities": {
"billing": 0.88,
"technical": 0.09,
"operations": 0.03
}
}
},
"usage": {
"input_tokens": 312,
"output_tokens": 28
}
}TypeScript 示例
typescript
const res = await fetch("https://www.zhonghedingfu.com/v1/systemone", {
method: "POST",
headers: {
"Authorization": "Bearer sk-你的key",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "jev-latest",
state: userFeedback,
questions: {
department: {
type: "choice",
instructions: "这条反馈应该转给哪个团队处理?",
criteria: {
billing: "与付款、充值、退款有关",
technical: "程序错误、功能故障",
operations: "账号封禁、政策咨询",
},
},
},
}),
});
const { answers } = await res.json();
// confidence < 0.7 时可考虑人工兜底
if (answers.department.confidence < 0.7) {
routeTo("manual_review");
} else {
routeTo(answers.department.choice); // "billing" | "technical" | "operations"
}Python 示例
python
import requests
resp = requests.post(
"https://www.zhonghedingfu.com/v1/systemone",
headers={"Authorization": "Bearer sk-你的key"},
json={
"model": "jev-latest",
"state": user_feedback,
"questions": {
"department": {
"type": "choice",
"instructions": "这条反馈应该转给哪个团队处理?",
"criteria": {
"billing": "与付款、充值、退款有关",
"technical": "程序错误、功能故障",
"operations": "账号封禁、政策咨询",
},
}
},
},
)
answer = resp.json()["answers"]["department"]
print(answer["choice"], answer["confidence"])
# billing 0.91混合调用 — 一次请求问多个问题
同一个 questions 对象里可以混合三种类型,Jev 并行评估后一次返回。
bash
curl https://www.zhonghedingfu.com/v1/systemone \
-H "Authorization: Bearer sk-你的key" \
-H "Content-Type: application/json" \
-d '{
"model": "jev-latest",
"state": "用户工单:账号被封,无法登录,非常着急",
"questions": {
"category": {
"type": "choice",
"instructions": "工单属于哪个类别?",
"criteria": {
"account": "账号封禁、权限问题",
"billing": "付款、充值、退款",
"bug": "程序错误、功能异常"
}
},
"urgency": {
"type": "score",
"instructions": "紧急程度?",
"criteria": ["低", "中", "高", "紧急"]
},
"needs_human": {
"type": "noul",
"instructions": "是否需要人工立即跟进?"
}
}
}'json
{
"model": "jev-latest",
"answers": {
"category": { "type": "choice", "choice": "account", "confidence": 0.93, "probabilities": {...} },
"urgency": { "type": "score", "score": 3, "confidence": 0.88 },
"needs_human": { "type": "noul", "noul": 0.91 }
},
"usage": {
"input_tokens": 348,
"output_tokens": 35
}
}注意事项
不要用 /v1/chat/completions 调 Jev
POST /v1/chat/completions 配合 model: "jev" 会返回 400。Jev 是 System One 协议,必须走 /v1/systemone 端点。
Jev 能做什么 / 不能做什么
✅ 适合
- 路由分发、工单分类
- 紧急度 / 风险分级
- 安全门控、内容过滤
- 审批阈值判断
❌ 不适合
- 生成文字、代码、解释
- 开放式问答
- 多步推理 / 长链规划
- 图片、音频、视频输入
Token 限制
state+ 最长问题 ≤ 32k tokens- 整个请求体 ≤ 64k tokens
高置信度 ≠ 一定正确
Jev 的 confidence / noul 是在大量预测里校准过的概率,不是"这个答案绝对正确"的保证。高风险操作(资金、封号)建议搭配更高阈值或人工复核,而不是直接信任单次结果。