Question

@ApiStatus.Experimental
sealed interface Question<out R : Any>

An immutable question definition whose answers have type R. The three implementations are PropositionQuestionSpec, ChoiceQuestionSpec and RatingQuestionSpec, and no other implementation can exist.

Build a question with Questions.named(...), or declare it inside a decision spec.

In JSON a question is an object whose kind member names its class.

Inheritors

Properties

Link copied to clipboard
abstract val instructions: String

The text that tells the model what to decide.

Link copied to clipboard
abstract val kind: QuestionKind

The kind of the question, which matches its result type.

Link copied to clipboard
abstract val name: String

The caller-owned name of the question. It is unique within a spec and names the answer in a response.