SDK 与客户端

jev_jsonschema

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

通过 TypeSafe 的 Jev API 运行 JSON Schema,返回 JSON 数据。

英文原文

Run a JSON Schema through TypeSafe's Jev API, and get JSON back.

Kiln-AI/jev_jsonschema

它在哪儿调用了 Jev

JEV_BASE_URL = "https://api.typesafe.ai"

src/jev_jsonschema/client.py:30

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

它问 Jev 的问题

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

取自 tests/test_client.py:58

  1. is_spam是/否

    Is this spam?

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    is_spam: { type: 'boolean', instructions: 'Is this spam?' },
  },
});

取自 tests/test_models.py:172

  1. is_correct是/否

    Is the answer correct?

  2. verdict是/否

    Overall verdict

  3. stars打分

    Rate 1 to 5

    • 01
    • 12
    • 23
    • 34
    • 45

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    is_correct: { type: 'boolean', instructions: 'Is the answer correct?' },
    verdict: { type: 'boolean', instructions: 'Overall verdict' },
    stars: { type: 'score', instructions: 'Rate 1 to 5',
      criteria: ['1', '2', '3', '4', '5'] },
  },
});

同类的其他项目