SDK 与客户端
n8n 社区节点,用于 TypeSafe Jev 结构化 AI 决策。
n8n community node for TypeSafe Jev structured AI decisions
default: 'https://api.typesafe.ai',credentials/TypeSafeApi.credentials.ts:31
链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
intent选项What is the primary request?
refund — Wants money returned.help — Wants something fixed.urgent是/否Does the customer convey time pressure?
frustration打分How frustrated is the customer?
0 — Calm or neutral1 — Concerned but civil2 — Very angryimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
intent: { type: 'choice', instructions: 'What is the primary request?',
criteria: { refund: 'Wants money returned.', help: 'Wants something fixed.' } },
urgent: { type: 'boolean', instructions: 'Does the customer convey time pressure?' },
frustration: { type: 'score', instructions: 'How frustrated is the customer?',
criteria: ['Calm or neutral', 'Concerned but civil', 'Very angry'] },
},
});