Article
CommunityJev Integrations & Adapters
Jev in BAML v1
BAML maps function return types onto Jev questions: bool and float become Noul probabilities, enums and literal unions become Choice picks, and one class turns its fields into a single multi-question request.
- Format
- Article
- Reading time
- 3 min
- Published by
- Community
- Author
- Sam Lijin
- Last verified
- Oct 2026
- Capabilities
- Requires API key
Highlights
- Ships first in a nightly and targets BAML v1: run baml toolchain use nightly, then baml toolchain update, and pin projects with baml toolchain pin nightly.
- bool returns true when the Noul probability is at least 0.5; float keeps the probability so NeedsPaging can compare it against 0.8.
- An enum's @@description supplies the question, each variant's @description its criteria, @alias the model-visible choice key, and @skip excludes variants.
- A class sends one request per field: TicketAssessment asks urgent, route, reply_within_hour, and mood together, while nested classes flatten into dotted ids.
- There is no Score mapping: 1 | 2 | 3 | 4 | 5 returns one of five integers, not an interpolated score such as 3.1.
Watch out
A vendor announcement of an unreleased integration: it arrives only in the nightly containing the TypeSafe client implementation, not in earlier releases or the v0 syntax, and its example answers are illustrative. Choice-key collisions are undecided in this release, and free-form string returns are rejected before any request.
Questions about this entry
Short answers drawn from the linked project or page.
Your function's return type defines the judgments you want and your prompt and descriptions explain how to make them. BAML builds the System One request from the realized type and reconstructs the typed result, so a bool return comes back as a bool.
Wait for the next BAML v1 nightly containing the TypeSafe client implementation, select it with baml toolchain use nightly and baml toolchain update, set TYPESAFE_API_KEY, add a function with client typesafeai/jev-latest, then run it with baml run.
bool and float map to Noul, with bool thresholding at 0.5 and float preserving the probability; enums and finite unions of literals, variants, or null map to Choice; a class with supported fields becomes one question per leaf field in a single request.
Declare the return type as float. The call asks the same question but returns the probability between 0.0 and 1.0, so your BAML code can pick its own threshold, as in a NeedsPaging function that compares the probability against 0.8.
Give the enum an @@description holding the question and each variant a @description holding its criteria; an @alias becomes the model-visible choice key. BAML decodes the returned choice from the options it offered, so a choice of tech becomes Team.Technical.
Team? is offered as the enum's choices plus a null option, which maps back to null; you can also return Team or hold, or a subset. Literal unions like Mood and integer unions like 1 | 2 | 3 | 4 | 5 work, with boolean and bigint literals supported too.
There is no Score mapping, so an integer union promises one of its members rather than an interpolated value. A union does not inherit an enum's @@description, and colliding choice keys are unresolved: the first reflected member owns the key and declaration order is not preserved.
From the Jev guides
Original write-ups on what this entry is for.
From the Jev AI model community
Posts from builders shipping with Jev right now.