Choice

data class Choice @JvmOverloads constructor(val instructions: ClassifierContent? = null, val criteria: Map<String, ClassifierContent?>) : Question

Asks a Classifier to pick one of two or more named labels.

Constructors

Link copied to clipboard
constructor(instructions: ClassifierContent? = null, criteria: Map<String, ClassifierContent?>)
constructor(instructions: String?, criteria: Map<String, String?>)

Creates a Choice with plain-text instructions and label descriptions. Because instructions has no default here, a call that omits it resolves to the primary constructor.

Types

Link copied to clipboard
class Builder

Fluent builder for Choice, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Maps each label (at least two) to an optional description of when it applies.

Link copied to clipboard
open override val instructions: ClassifierContent?

What to decide.

Functions

Link copied to clipboard

Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.