Questions - TypeSafe AI
State
state is the text or JSON object you want to ask questions about. It cannot be None, but values inside an object may be None.
Question objects
Use Noul, Choice, and Score to define questions with named arguments.
typesafe_sdk.NoulCriteria
Bases: TypedDict Optional descriptions of the yes and no outcomes. See the noul primitive for details.
true
instance-attribute
true: JSONContent | None
Description of the yes outcome as text, a JSON object, or an array; None leaves it undescribed.
false
instance-attribute
false: JSONContent | None
Description of the no outcome as text, a JSON object, or an array; None leaves it undescribed.
typesafe_sdk.Noul
pydantic-model Bases: _Question, wire.NoulQuestion A yes/no question with optional descriptions for either outcome. See the noul primitive for details.
instructions
pydantic-field
instructions: JSONContent | None = None
The question to ask, expressed as text, a JSON object, or an array; optional.
criteria
pydantic-field
criteria: NoulCriteria | None = None
Optional descriptions of the yes and no outcomes.
typesafe_sdk.Choice
pydantic-model Bases: _Question, wire.ChoiceQuestion A question that selects between named alternatives. See the choice primitive for details.
criteria
pydantic-field
criteria: Mapping[str, JSONContent | None]
Labels mapped to text, object, or array descriptions, or None for undescribed labels.
instructions
pydantic-field
instructions: JSONContent | None = None
The question to ask, expressed as text, a JSON object, or an array; optional.
typesafe_sdk.Score
pydantic-model Bases: _Question, wire.ScoreQuestion A question that assigns a score using an ordered rubric. See the score primitive for details.
criteria
pydantic-field
criteria: Sequence[JSONContent]
A nonempty, ordered list of text, object, or array descriptions, one per score from zero.
instructions
pydantic-field
instructions: JSONContent | None = None
The question to ask, expressed as text, a JSON object, or an array; optional.