SDKs & clients

LLM2Jev

@Yinsongxu4PythonApache-2.0updated 2026-09-20runnable

Adapt local language models into Jev-compatible structured decision engines with Choice, Score, and Noul outputs powered by prefill-only binary inference.

Yinsongxu/LLM2Jev

Where it calls Jev

if any(getattr(route, "path", None) == "/v1/systemone" for route in app.routes):

src/llm2jev/sglang_server.py:122

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from examples/sglang_inference.py:14

  1. deliverytrue/false

    这是否是一个物流配送问题?

  2. departmentchoice

    哪个部门应该处理这个请求?

    • shipping物流配送
    • billing付款账单
    • technical产品故障
  3. urgencyscore

    这个请求有多紧急?

    • 0不紧急
    • 1比较紧急
    • 2非常紧急

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    delivery: { type: 'boolean', instructions: '这是否是一个物流配送问题?' },
    department: { type: 'choice', instructions: '哪个部门应该处理这个请求?',
      criteria: { shipping: '物流配送', billing: '付款账单', technical: '产品故障' } },
    urgency: { type: 'score', instructions: '这个请求有多紧急?',
      criteria: ['不紧急', '比较紧急', '非常紧急'] },
  },
});

from examples/transformers_inference.py:30

  1. is_delivery_issuetrue/false

    这是否是一个物流配送问题?

  2. departmentchoice

    这个请求应该交给哪个部门处理?

    • billing付款、账单或退款问题
    • shipping物流、配送或包裹丢失问题
    • technical产品故障或技术支持问题
  3. urgencyscore

    评估这个客户请求的紧急程度。

    • 0不紧急
    • 1比较紧急
    • 2非常紧急

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    is_delivery_issue: { type: 'boolean', instructions: '这是否是一个物流配送问题?' },
    department: { type: 'choice', instructions: '这个请求应该交给哪个部门处理?',
      criteria: { billing: '付款、账单或退款问题', shipping: '物流、配送或包裹丢失问题', technical: '产品故障或技术支持问题' } },
    urgency: { type: 'score', instructions: '评估这个客户请求的紧急程度。',
      criteria: ['不紧急', '比较紧急', '非常紧急'] },
  },
});

from tests/test_binary.py:41

  1. refundtrue/false

    Is a refund requested?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

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

Other projects in this category