TypeSafe.SystemOne.Prepared (TypeSafe AI v0.1.0-alpha.1)

Copy Markdown View Source

A question set that has been validated, encoded, and had its caller keys recorded, ready to send with any number of states.

Doing this work once is what makes TypeSafe.evaluate_many/4 cheap: the validation, the wire encoding and the TypeSafe.Keys registry are identical for every state, so they are built once and shared across tasks. It is a struct rather than a bare map so the functions that take one can match on it and fail loudly when handed something else.

Summary

Types

t()

@type t() :: %TypeSafe.SystemOne.Prepared{
  count: pos_integer(),
  encoded: TypeSafe.JSON.OrderedObject.t(),
  keys: TypeSafe.Keys.t(),
  questions: [{TypeSafe.Keys.key(), TypeSafe.Question.t()}]
}