
EliaAlberti/jev-rules on GitHub
- Stars
- 49
- Forks
- 6
- Language
- JavaScript
- License
- MIT
- Last push
- 22 Sep 2026
Read from GitHub on . Counts change daily.
How it uses Jev
export const BACKENDS = {
typesafe: {
url: "https://api.typesafe.ai/v1/systemone",
model: "jev-latest",
headers: (key) => ({ authorization: `Bearer ${key}`, "content-type": "application/json" }),
encode: (state, questions) => ({
state,
model: "jev-latest",
questions: Object.fromEntries(
questions.map(({ id, instructions, criteria }) => [id, { type: "noul", instructions, ...(criteria && { criteria }) }]),
),
}),
decode: (json) => ({
model: typeof json?.model === "string" ? json.model : "jev-latest",
probabilities: mapAnswers(json?.answers, (a) => a?.noul),
