SDK 与客户端
Node 客户端,用于 Typesafe Jev 等决策模型。
Node client for decision models such as Typesafe Jev
return "https://api.typesafe.ai";链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
urgent是/否Is this urgent?
severity打分How severe is this?
0 — cosmetic1 — minor2 — major3 — criticalimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
urgent: { type: 'boolean', instructions: 'Is this urgent?' },
severity: { type: 'score', instructions: 'How severe is this?',
criteria: ['cosmetic', 'minor', 'major', 'critical'] },
},
});answer是/否Is this urgent?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
answer: { type: 'boolean', instructions: 'Is this urgent?' },
},
});