SDK 与客户端

n8n-nodes-typesafe-jev

@n3ndor1TypeScriptMIT更新于 2026-09-19可当场跑

n8n 社区节点,用于 TypeSafe Jev 结构化 AI 决策。

英文原文

n8n community node for TypeSafe Jev structured AI decisions

n3ndor/n8n-nodes-typesafe-jev

它在哪儿调用了 Jev

default: 'https://api.typesafe.ai',

credentials/TypeSafeApi.credentials.ts:31

链接指向我们抓取当天的那个 commit,行号是准的。

它问 Jev 的问题

下面是从这个项目源码里原样取出来的 question 组合。

取自 scripts/verify-api.mjs:104

  1. intent选项

    What is the primary request?

    • refundWants money returned.
    • helpWants something fixed.
  2. urgent是/否

    Does the customer convey time pressure?

  3. frustration打分

    How frustrated is the customer?

    • 0Calm or neutral
    • 1Concerned but civil
    • 2Very angry

用你自己的内容跑一遍

代码
import { 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'] },
  },
});

同类的其他项目