alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Interface IResponseBlock

    Represents a response block that can be rendered within the SfAIAssistView component.

    Namespace: Syncfusion.Blazor.InteractiveChat
    Assembly: Syncfusion.Blazor.InteractiveChat.dll
    Syntax
    public interface IResponseBlock
    Remarks

    The IResponseBlock interface serves as the base contract for all AI response block types displayed in the AI AssistView conversation. Implementations define the structure and metadata required to render specific content such as text, reasoning traces, charts, grids, weather cards, and other generative UI elements.

    The rendering behavior of a response block is determined by the value of the BlockType property. The AI AssistView uses this value to resolve the appropriate UI template and presentation logic for the response.

    Built-in implementations typically include text-based responses, thinking/reasoning blocks, and tool-based blocks that can host custom interactive UI elements.

    Examples

    The following example demonstrates creating a text response block:

    List<IResponseBlock> responseBlocks = new()
    {
        new TextBlock
        {
            BlockType = BlockType.Text
            Content = "Hello! How can I assist you today?"
        }
    };
    
    await aiAssistView.UpdateResponseAsync(string.Empty, responseBlocks);

    Properties

    BlockType

    Gets the type of the response block.

    Declaration
    BlockType BlockType { get; }
    Property Value
    Type Description
    BlockType

    A BlockType value that identifies the category of content represented by the current response block. No default value is defined by the interface and must be provided by the implementing type.

    Remarks

    This property is used by the SfAIAssistView component to determine how the response block should be rendered in the conversation view.

    Implementations should return a valid and consistent BlockType value throughout the lifetime of the block instance.

    Common block types include text content, reasoning or thinking content, and tool-driven generative UI content.

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