开源复现
Jev风格的模型推理引擎,提供与Jev兼容的API。
Jev-like model inference engine + Jev-compatible API
print(" Jev-compatible: POST /v1/systemone GET /v1/models"链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
取自 scripts/jev_conformance.py:53
billing是/否Is this message about billing?
urgent是/否Does this need a reply within the hour?
team选项Which team should handle it?
payments — Payouts, refunds, chargesplatform — Latency, outages, errorstone打分How frustrated is the customer?
0 — calm1 — frustrated2 — very angryimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
billing: { type: 'boolean', instructions: 'Is this message about billing?' },
urgent: { type: 'boolean', instructions: 'Does this need a reply within the hour?' },
team: { type: 'choice', instructions: 'Which team should handle it?',
criteria: { payments: 'Payouts, refunds, charges', platform: 'Latency, outages, errors' } },
tone: { type: 'score', instructions: 'How frustrated is the customer?',
criteria: ['calm', 'frustrated', 'very angry'] },
},
});