Skip to main content
All docs
V25.1
  • DxAIChatPromptSuggestion Class

    Defines a prompt suggestion (hint bubble) in the DxAIChat component.

    Namespace: DevExpress.AIIntegration.Blazor.Chat

    Assembly: DevExpress.AIIntegration.Blazor.Chat.v25.1.dll

    NuGet Package: DevExpress.AIIntegration.Blazor.Chat

    Declaration

    public class DxAIChatPromptSuggestion :
        ComponentBase,
        IPromptSuggestion,
        IDisposable

    Remarks

    DevExpress Blazor AI Chat supports prompt suggestions – hints that guide users to possible actions. The component displays prompt suggestions (hint bubbles) when the chat area is empty.

    AI Chat - Prompt Suggestions

    Follow the steps below to enable and configure prompt suggestions:

    1. Populate the component’s PromptSuggestions property with DxAIChatPromptSuggestion objects (hint bubbles).
    2. Specify bubble content using Title and Text properties.
    3. Use the PromptMessage property to specify the text to be displayed in the input field after a user clicks the corresponding suggestion.

    Run Demo: AI Chat – Prompt Suggestions

    @using DevExpress.AIIntegration.Blazor.Chat
    
    <DxAIChat Initialized="ChatInitialized">
        <PromptSuggestions>
            @foreach (var suggestion in PromptSuggestions) {
                <DxAIChatPromptSuggestion Title="@suggestion.Title"
                                          Text="@suggestion.Text"
                                          PromptMessage="@suggestion.PromptMessage" />
            }
        </PromptSuggestions>
    </DxAIChat>
    
    @code {
        List<PromptSuggestion> PromptSuggestions { get; set; }
        void ChatInitialized() {
            PromptSuggestions = GetData();
        }
    }
    

    Inheritance

    Object
    ComponentBase
    DxAIChatPromptSuggestion
    See Also