TypeSafeDecisionModel unstable
TypeSafe's System One implementation of DecisionModel.
Constructors
Builds a decision service. Probabilities arrive rounded to two decimals, so DecisionModel rescales small sum drift when it validates distributions and derives rating labels.
Details
Each Decision.Image field is sent as a base64 asset keyed by the reference
that replaces it in state, so instructions name an image by its field path,
such as `photo`. Requests with images opt in to TypeSafe's preview image
support. Locate decisions become Box questions whose instructions end with
the image path; they need Jev 1.14 ("jev-preview" or "jev-1.14.0").
Gotchas
- Images must be PNG or JPEG, 256 to 1568 pixels on each side. The API rejects other sizes rather than resizing, and ignores EXIF orientation.
- Remote URLs fail with
AiError.InvalidUserInputErrorbecause TypeSafe does not fetch them.
Signature
declare const make: (...args: [options: { readonly model: Model | string & {};}]) => Effect<DecisionModel, never, TypeSafeClient>Creates a decision model with TypeSafe provider metadata.
Signature
declare function model(model: Model | string & {}): Model<"typesafe", DecisionModel, TypeSafeClient>