Skip to main content

Module ai_decision

Module ai_decision 

Source

Structs§

AiDecision
AiDecision : AI decision step: one call to a decision model (TypeSafe’s Jev, or Cloudflare’s Jev-compatible Clef) that answers typed questions about a state with calibrated probabilities, instead of generating text. Prefer it over an AI agent to classify, route, score or check something: it is fast, cheap and its answers are structured. Its result is { output: { : answer }, model, usage }, so a later step reads e.g. results..output.intent.choice. To route on the answers, follow it with a branchone whose branch exprs read results..output..choice. Usable as an AI agent tool, where the calling agent supplies the state.

Enums§

Type