UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

22 lines (21 loc) • 1.1 kB
/** * Decision inference types — typed, calibrated judgements from a model that * emits no text. * * `decide` is the third inference type, alongside `generate` and `stream`. A * decision model takes one `state` plus a map of named typed questions and * returns one typed answer per question, all evaluated in a single parallel * pass. TypeSafe's Jev is the first such model; Vercel's AI SDK models the * same class separately from `LanguageModelV4`, for the same reason. * * The vocabulary here is deliberately **provider-neutral**. TypeSafe calls a * yes/no question a `noul` and answers it in a field of the same name; both * the Vercel AI SDK and Pydantic AI independently renamed that to `boolean` / * `probability` when exposing it. This file follows them, and the mapping to * a vendor's wire format belongs in that vendor's provider. * * Names are domain-prefixed `Decision*` to stay globally unique across * `src/lib/types/` (CLAUDE.md rule 9). Note `evaluate`/`Evaluation*` is a * different, unrelated feature — scoring a generated response with RAGAS. */ export {};