Table of Contents

Class Question

Namespace
JD.AI.Core.Questions
Assembly
JD.AI.Core.dll

A single question within an AskQuestionsRequest.

public sealed class Question
Inheritance
Question
Inherited Members

Properties

DefaultValue

Pre-filled value shown to the user. If the user submits without typing, the default is used as the answer (only when Required is false or a default exists).

public string? DefaultValue { get; init; }

Property Value

string

Key

Stable identifier used as the key in Answers.

public string Key { get; init; }

Property Value

string

Options

Available options for SingleSelect and MultiSelect questions.

public IReadOnlyList<string> Options { get; init; }

Property Value

IReadOnlyList<string>

Prompt

Text shown to the user as the question prompt.

public string Prompt { get; init; }

Property Value

string

Required

When true the user must provide a non-empty answer before proceeding.

public bool Required { get; init; }

Property Value

bool

Type

Input type that determines how the TUI renders and captures the answer.

public QuestionType Type { get; init; }

Property Value

QuestionType

Validation

Optional validation rules applied before accepting the answer.

public QuestionValidation? Validation { get; init; }

Property Value

QuestionValidation