CloudflareDecisionModel unstable
Cloudflare Clef implementation of DecisionModel over Workers AI REST.
Constructors
Builds a decision service with tolerance for four-decimal probability rounding.
Details
Base64 data is sent with its media type, and data: URLs are sent
unchanged. Clef shows images before the state, so with images the state is
sent as text that first lists each image's reference in order. The API
enforces image limits.
Gotchas
- Remote URLs fail with
AiError.InvalidUserInputErrorbecause Clef does not fetch them.
Signature
declare const make: (...args: [options: { readonly model: "clef" | "clef-flash" | string & {};}]) => Effect<DecisionModel, never, CloudflareClient>Creates a decision model with Cloudflare provider metadata.
Signature
declare function model(model: "clef" | "clef-flash" | string & {}): Model<"cloudflare", DecisionModel, CloudflareClient>