Jev Code Generator

Turn a tested classifier configuration into starter code.

The generator uses deterministic templates. It does not make another AI request and does not include the text you pasted.

JevClassify is an independent tool and is not affiliated with, sponsored by, or endorsed by TypeSafe AI.

Example configuration

Same setup, no re-entry.

QuestionClassify the text into the single best matching category.
CategoriesBilling · Technical · Account · Sales · Other
Raw textExcluded from generated code.

Generate Jev Code

Take this classifier into your app.

import { createGateway, experimental_evaluate as evaluate } from "ai";

const gateway = createGateway({
  apiKey: process.env.AI_GATEWAY_API_KEY,
});

export async function classifyText(text: string) {
  const result = await evaluate({
    model: gateway.evaluationModel("typesafe-ai/jev"),
    state: text,
    questions: {
      category: {
        type: "choice",
        instructions: "Classify the text into the single best matching category.",
        criteria: {
          "option_0": "Billing",
          "option_1": "Technical",
          "option_2": "Account",
          "option_3": "Sales",
          "option_4": "Other"
},
      },
    },
    maxRetries: 0,
    abortSignal: AbortSignal.timeout(25_000),
  });

  return result.answers.category;
}

Starter integration code. Review and test it before production use.