alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class AssistViewPrompt

    Represents a prompt in the SfAIAssistView component.

    Inheritance
    object
    AssistViewPrompt
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.InteractiveChat
    Assembly: Syncfusion.Blazor.InteractiveChat.dll
    Syntax
    public class AssistViewPrompt
    Remarks

    This class is used to define prompts that are displayed in the AI Assist view.

    Constructors

    AssistViewPrompt()

    Declaration
    public AssistViewPrompt()

    Properties

    AttachedFiles

    Gets or sets the collection of files attached to this prompt in the SfAIAssistView component.

    Declaration
    public List<FileInfo> AttachedFiles { get; set; }
    Property Value
    Type Description
    List<FileInfo>

    A list of FileInfo objects representing files that were uploaded and associated with this specific prompt.

    Remarks

    Used to display files attached to the prompt, making it easy to view, manage, and interact with attachments directly within the AI assistance interface.

    Blocks

    Gets or sets the collection of response blocks associated with the prompt.

    Declaration
    public List<IResponseBlock> Blocks { get; set; }
    Property Value
    Type Description
    List<IResponseBlock>

    A List<T> of IResponseBlock objects that define the structured response content for the prompt. The default value is an empty collection.

    Remarks

    This property enables a prompt response to contain one or more specialized response blocks that can be rendered by the SfAIAssistView component.

    Supported block types include text responses, thinking or reasoning blocks, and tool-based blocks that render custom user interfaces such as charts, grids, and weather cards.

    The blocks are rendered in the order in which they appear in the collection. For best performance, avoid adding unnecessary or excessively large blocks, as this may increase rendering time and memory consumption.

    Examples

    The following example demonstrates how to add text and thinking blocks to a response:

    var prompt = new AssistViewPrompt
    {
        Prompt = "Explain the solution",
        Blocks = new List<IResponseBlock>
        {
            new ThinkingBlock
            {
                Title = "Reasoning",
                Content = "Analyzing the request...",
                BlockType = BlockType.Thinking
            },
            new TextBlock
            {
                Content = "Here is the final answer.",
                BlockType = BlockType.Text
            }
        }
    };

    IsResponseHelpful

    Gets or sets a value indicating whether the response is considered helpful. Represents the state of whether the generated response is useful or not.

    Declaration
    public bool? IsResponseHelpful { get; set; }
    Property Value
    Type Description
    bool?

    A boolean indicating if the response is helpful, or null if not applicable. The default value is null.

    Prompt

    Gets or sets the text of the prompt in the SfAIAssistView component.

    Declaration
    public string Prompt { get; set; }
    Property Value
    Type Description
    string

    The text of the prompt. The default is String.Empty.

    Remarks

    This property specifies the text for the SfAIAssistView component.

    RegeneratedResponses

    Gets or sets the collection of regenerated response variations for this prompt.

    Declaration
    public List<string> RegeneratedResponses { get; set; }
    Property Value
    Type Description
    List<string>

    A list of strings representing alternative responses that have been generated for the same prompt. The default is null.

    Remarks

    This property is used to preload response history when initializing the component with existing conversation data. The component will combine the original response with these regenerated responses to build a complete response stack that can be navigated using Previous/Next buttons.

    When set, the response history will be initialized as: [Response, ...RegeneratedResponses]

    This property is optional and only needs to be set when restoring conversation state with response variations.

    Response

    Gets or sets the response of the specified prompt in the SfAIAssistView component.

    Declaration
    public string Response { get; set; }
    Property Value
    Type Description
    string

    The output response of the prompt. The default is String.Empty.

    Remarks

    This property specifies the output response for the SfAIAssistView component.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved