Guide Shows TypeSafe AI’s Jev Returning Typed Decisions Without Text Generation
MarkTechPost guide shows TypeSafe AI’s Jev returning typed choices, scores and probabilities instead of generated text.
The tutorial installs the official Python SDK, pinned to typesafe-sdk version 0.7.0. It loads an API key from the TYPESAFE_API_KEY environment variable, from Colab’s Secrets tab, or from a hidden prompt so the key does not appear in the notebook. TypeSafeClient reads TYPESAFE_API_KEY on its own and defaults to the jev-latest alias. Listing the models, the guide says, shows which model names and pinned versions the key can use.
A small helper named ask wraps the system_one call so that every request in the notebook is timed and its token usage is added to a running ledger. The guide sets a price constant of 0.042 US dollars per million input tokens and states that output tokens are free. At the end, the ledger prices the whole notebook.
The guide’s first live example uses a support ticket object. The object contains a customer message about a duplicate charge for order A-104, a support reply saying the charges are being checked, an order record showing two captured charges of 49 dollars each, and a refund policy stating that duplicate charges are eligible for a full refund within 30 days. The call asks four typed questions at once. Department is a Choice question with criteria for billing, technical and sales. Frustration is a Score question with criteria ranging from calm to very angry. Refund_requested and policy_supports are Noul questions, which return yes/no probabilities.
The response exposes a department choice, its confidence and probabilities. The guide uses that output to show how the three question primitives work in a single call: Choice returns a selected label, Score returns a score, and Noul returns a yes/no probability. It also recomputes the published confidence statistic from the returned probabilities.
The tutorial measures what batching ten questions into one call buys over ten separate calls. It then builds patterns the API is designed for: confidence-gated routing, composite scoring with weights kept in code, typed function calling, and counting done in a way the model can actually perform. These patterns are presented as the intended use of the API, not as separate model capabilities.
For production use, the guide describes Pydantic response models, an async client fanned out with asyncio, retry policies, typed errors, and a running ledger that prices the whole notebook. The guide also notes that the shape of the state changes what the model can know, making the program state sent with each request part of the decision process.
Editor's Summary
The MarkTechPost guide demonstrates TypeSafe AI’s Jev as a System One model that returns typed choices, scores and yes/no probabilities rather than generated text. Its Python SDK and examples cover confidence-gated routing, composite scoring, typed function calling and production patterns such as async fan-out and a token-priced ledger. The single-source tutorial shows how developers can integrate the model into code that branches directly on its outputs.