logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AiPromptQuestion

    One declarative question an intent's questionnaire asks. Intents build lists of these as plain data; a single shared GUI renderer draws every AiPromptQuestionKind from them.

    Inheritance
    object
    AiPromptQuestion
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Editor.AiPromptBuilder
    Assembly: Serenity.AiPromptBuilder.Editor.dll
    Syntax
    public sealed class AiPromptQuestion

    Constructors

    AiPromptQuestion(string, string, AiPromptQuestionKind, IReadOnlyList<AiPromptChoice>, string, bool)

    Declaration
    public AiPromptQuestion(string key, string label, AiPromptQuestionKind kind, IReadOnlyList<AiPromptChoice> choices = null, string helpText = null, bool isRequired = false)
    Parameters
    Type Name Description
    string key
    string label
    AiPromptQuestionKind kind
    IReadOnlyList<AiPromptChoice> choices
    string helpText
    bool isRequired

    Properties

    Choices

    Declaration
    public IReadOnlyList<AiPromptChoice> Choices { get; }
    Property Value
    Type Description
    IReadOnlyList<AiPromptChoice>

    Selectable options for SingleChoice, MultiChoice, ExistingAssetPick and ExistingAssetMultiPick. Empty for FreeText and Toggle.

    HelpText

    Declaration
    public string HelpText { get; }
    Property Value
    Type Description
    string

    Optional helper text shown under the question.

    IsRequired

    Declaration
    public bool IsRequired { get; }
    Property Value
    Type Description
    bool

    When true, the owning intent's Validate must reject an empty answer for this question.

    Key

    Declaration
    public string Key { get; }
    Property Value
    Type Description
    string

    Stable key this question's answer is stored under in an AiPromptAnswerSheet.

    Kind

    Declaration
    public AiPromptQuestionKind Kind { get; }
    Property Value
    Type Description
    AiPromptQuestionKind

    Which control renders this question and how its answer is stored.

    Label

    Declaration
    public string Label { get; }
    Property Value
    Type Description
    string

    Human-readable label shown next to the question's control.

    In this article
    © 2026 Serenity. All Rights Reserved