jev
A terminal REPL for shaping TypeSafe AI System One requests before you
write any code: send a state plus named, typed questions and read the typed answers back.
| Question | Answer |
|---|---|
noul |
probability of "yes" (0–1) |
choice |
selected label, per-label probabilities, confidence |
score |
probability-weighted level, legend, per-level probabilities, confidence |
Inside
:preset triage # a ready-made session to poke at
:state The payout failed again, third time. # bare text works too
:noul is_urgent The message conveys urgency | yes: A deadline | no: Routine
:choice department Which team | billing=Payments | technical=Bugs
:score frustration How frustrated | Calm | Annoyed | Furious
<Enter> # send; answers come back with their distributions
-
:lessonwalks an eleven-step track from "what is a noul" to what a call costs. -
:sketch(Ctrl-K) opens the whole request as one page of text, with the question types read off the punctuation, a gutter that says what each line became, and a live preview of the JSON, simulated answers, the same request as Rust, or what a call would cost:The payout failed again, third time this month. --- is_urgent? The message conveys urgency yes: A deadline or a threat to leave department: Which team should handle this billing = Payment or subscription issues technical = Bugs or integration problems frustration: How frustrated the customer appears Calm < Frustrated but civil < Very angry -
:buildopens a form for one question;:jsonshows the exact request body,:lastthe raw response,:rustthe session as a program againsttypesafe-ai-sdk. -
:costsays what a call is about to cost, per question and on both sides of the wire — a choice over eight labels comes back with eight probabilities, a score echoes its whole legend:in out department choice 74 58 frustration score 60 93 is_urgent noul 32 19 state 40 · envelope 22 16 total 228 186 414 tokens per call $0.000232 per call · $0.2316 per 1,000 calls at $0.20/$1.00 per MtokRates are yours to supply, because nothing here knows what a model charges:
:cost 0.20/1.00is dollars per million tokens, input then output, andJEV_PRICE=0.20/1.00sets the same at startup. Without them the table counts tokens and stops there. Tokens are estimated from the body — roughly four characters a token — so they are a shape, not an invoice; a live answer carries the countedusage, and the REPL prices that instead. -
:save triage.jev/:open triage.jevkeep sessions as sketch pages; other paths use the request JSON.
Outside
A session shaped in the REPL and saved with :save is something a script can run. With a
subcommand jev never opens a terminal: it reads a page (or stdin), prints one thing, and says
with its exit status whether it worked — 0 when it did, 1 when the call or the file did not, 2 when
the command line did not parse.
|
The file is a .jev page or a request body, and which one it is comes from the text rather than
the name, so a body piped back in works the same: jev json page.jev | jev cost. -, or no file
at all, reads stdin.
|
--state <text> sets or replaces the state, --model <name> picks the model, --threshold <0-1>
says what counts as a yes for a noul, --price <in>/<out> prices the table, --timeout <seconds>
bounds a live attempt, and --mock stays offline even with a key set. Without a key jev run
simulates the answers and says so on stderr, so the stdout of a mock run is still the answer page.
Without TYPESAFE_API_KEY it starts in mock mode: answers are simulated locally (deterministic,
not predictive) so the shapes can be learned offline. :key <api-key> switches to live calls.
Unofficial. Not affiliated with TypeSafe AI. MIT licensed; source and issues at aoprisan/typesafe-ai-rust-sdk.