应用产品

tryjev

@sugarforever1SvelteMIT更新于 2026-09-20可当场跑

Jev Playground 是一个用于测试和体验 Jev 的在线环境。

英文原文

Jev Playground

sugarforever/tryjev

它在哪儿调用了 Jev

<span class="tag">{provider === 'vercel' ? 'experimental_evaluate' : provider === 'typesafe' ? '/v1/systemone' : 'alpha.decisions'}</span>

src/routes/+page.svelte:207

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

它问 Jev 的问题

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

取自 src/lib/cookbook.ts:29

  1. category选项

    Main category of this ticket

    • bugProduct failure or unable to use
    • billingCharges, payments or refunds
    • featureFeature request
    • spamSpam or meaningless content
  2. bug_severity打分

    If this is a bug, how severe is it

    • 0cosmetic: minor visual issue
    • 1minor: has a workaround
    • 2major: core feature affected
    • 3blocking: completely unusable
  3. wants_refund是/否

    Is the user asking for a refund?

  4. frustration打分

    The user's mood

    • 0calm
    • 1annoyed
    • 2furious

用你自己的内容跑一遍

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

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    category: { type: 'choice', instructions: 'Main category of this ticket',
      criteria: { bug: 'Product failure or unable to use', billing: 'Charges, payments or refunds', feature: 'Feature request', spam: 'Spam or meaningless content' } },
    bug_severity: { type: 'score', instructions: 'If this is a bug, how severe is it',
      criteria: ['cosmetic: minor visual issue', 'minor: has a workaround', 'major: core feature affected', 'blocking: completely unusable'] },
    wants_refund: { type: 'boolean', instructions: 'Is the user asking for a refund?' },
    frustration: { type: 'score', instructions: 'The user\'s mood',
      criteria: ['calm', 'annoyed', 'furious'] },
  },
});

取自 src/lib/cookbook.ts:51

  1. fine选项

    Most specific issue type

    • duplicate_chargeCharged more than once for one purchase
    • declined_cardPayment declined at checkout
    • refund_statusAsking where a refund is
    • invoice_requestWants an invoice or receipt
  2. coarse选项

    Broad department

    • paymentsAnything about charges, cards or refunds
    • accountLogin, profile, settings
    • productUsing the product itself

用你自己的内容跑一遍

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

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    fine: { type: 'choice', instructions: 'Most specific issue type',
      criteria: { duplicate_charge: 'Charged more than once for one purchase', declined_card: 'Payment declined at checkout', refund_status: 'Asking where a refund is', invoice_request: 'Wants an invoice or receipt' } },
    coarse: { type: 'choice', instructions: 'Broad department',
      criteria: { payments: 'Anything about charges, cards or refunds', account: 'Login, profile, settings', product: 'Using the product itself' } },
  },
});

取自 src/lib/cookbook.ts:71

  1. fit打分

    How well does this company match a mid-market logistics customer

    • 0poor
    • 1partial
    • 2good
    • 3ideal
  2. urgency打分

    How soon do they intend to buy

    • 0someday
    • 1this year
    • 2this quarter
    • 3this month
  3. has_budget是/否

    Do they state that budget is approved or available?

  4. decision_maker是/否

    Does the writer appear to be a decision maker rather than a researcher?

用你自己的内容跑一遍

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

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    fit: { type: 'score', instructions: 'How well does this company match a mid-market logistics customer',
      criteria: ['poor', 'partial', 'good', 'ideal'] },
    urgency: { type: 'score', instructions: 'How soon do they intend to buy',
      criteria: ['someday', 'this year', 'this quarter', 'this month'] },
    has_budget: { type: 'boolean', instructions: 'Do they state that budget is approved or available?' },
    decision_maker: { type: 'boolean', instructions: 'Does the writer appear to be a decision maker rather than a researcher?' },
  },
});

取自 src/lib/cookbook.ts:97

  1. model选项

    Pick the most suitable model tier for the latest user turn

    • cheapEveryday Q&A, typo fixes, light rewrites, small talk
    • strongMulti-step reasoning, writing or debugging code, long-document analysis, math
    • noneGreeting or acknowledgement that needs no model at all

用你自己的内容跑一遍

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

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    model: { type: 'choice', instructions: 'Pick the most suitable model tier for the latest user turn',
      criteria: { cheap: 'Everyday Q&A, typo fixes, light rewrites, small talk', strong: 'Multi-step reasoning, writing or debugging code, long-document analysis, math', none: 'Greeting or acknowledgement that needs no model at all' } },
  },
});

同类的其他项目