SDK 与客户端

node-decision-model

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

Node 客户端,用于 Typesafe Jev 等决策模型。

英文原文

Node client for decision models such as Typesafe Jev

fraserxu/node-decision-model

它在哪儿调用了 Jev

return "https://api.typesafe.ai";

src/providers/typesafe.ts:18

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

它问 Jev 的问题

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

取自 test/cli.test.ts:86

  1. urgent是/否

    Is this urgent?

  2. severity打分

    How severe is this?

    • 0cosmetic
    • 1minor
    • 2major
    • 3critical

用你自己的内容跑一遍

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

取自 test/cli.test.ts:562

  1. 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?' },
  },
});

同类的其他项目