GitHub

API reference for schema.

Cloudflare's Clef wire format (Effect's CloudflareSchema): the questions and images of a decisions request and the answers of its response, as TypedDict types with their schemas.

Values

AttributeTypeDescription
ENTRYUnionSchema[str | dict[str, bool | int | float | str | Sequence[JsonValue] | Mapping[str, JsonValue] | None] | tuple[bool | int | float | str | Sequence[JsonValue] | Mapping[str, JsonValue] | None, ...], str | Mapping[str, bool | int | float | str | Sequence[JsonValue] | Mapping[str, JsonValue] | None] | Sequence[bool | int | float | str | Sequence[JsonValue] | Mapping[str, JsonValue] | None], Never, Never]
CHOICE_QUESTIONStructSchema[ChoiceQuestion, Never, Never]
SCORE_QUESTIONStructSchema[ScoreQuestion, Never, Never]
NOUL_QUESTIONStructSchema[NoulQuestion, Never, Never]
QUESTIONUnionSchema[ChoiceQuestion | ScoreQuestion | NoulQuestion, Mapping[str, object], Never, Never]
IMAGEUnionSchema[str | Base64Image, str | Mapping[str, object], Never, Never]
DECISIONS_REQUESTStructSchema[DecisionsRequest, Never, Never]
CHOICE_ANSWERStructSchema[ChoiceAnswer, Never, Never]
SCORE_ANSWERStructSchema[ScoreAnswer, Never, Never]
NOUL_ANSWERStructSchema[NoulAnswer, Never, Never]
ANSWERUnionSchema[ChoiceAnswer | ScoreAnswer | NoulAnswer, Mapping[str, object], Never, Never]
DECISIONS_RESPONSEStructSchema[DecisionsResponse, Never, Never]

Types

TypeDefinitionDescription
Entrytype Entry = str | Mapping[str, JsonValue] | Sequence[JsonValue]

Instructions or a description: a string, a JSON object or a JSON array.

Questiontype Question = ChoiceQuestion | ScoreQuestion | NoulQuestion
Imagetype Image = str | Base64Image

A data: URL or base64 data with its media type.

Answertype Answer = ChoiceAnswer | ScoreAnswer | NoulAnswer

Classes