Expand description
The thing you are building in the REPL: a state, some named questions, a model.
Structs§
- Session
- Everything the next
:askwill send. - Turn
- One turn of a conversation held as the state: who spoke, and what they said.
Functions§
- from_
body - Rebuild a session from a saved request body (
:open), keeping typed questions where thetypeis one this SDK models. - is_
empty_ value - Whether a value is empty enough that there is nothing to judge.
- parse_
choice name instructions | label=description | bare_label | …- parse_
noul name instructions [| yes: ...] [| no: ...]- parse_
raw name {json}— a hand-built question object, likeQuestion::Raw.- parse_
score name instructions | level | level | …- parse_
turn who: what they said, or just what they said.- question_
from_ json - Map a wire question back to a typed one; anything unfamiliar stays
Question::Raw. - turn_
text customer: The payout failed again— one turn on one line.- turns_
of - Read a state as a conversation, or
Nonewhen it is not one. - turns_
to_ json - Turns as they go on the wire:
whoonly when there is one, so nothing empty is paid for. - value
- Instructions, descriptions and levels accept any JSON, so
{…}/[…]is parsed as such and anything else is sent as a plain string.
Type Aliases§
- Entry
- A question under construction, kept in the order it was added (answers come back in that order).