Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxAIChat.ResponseContentFormat Property

Specifies the format of response content.

Namespace: DevExpress.AIIntegration.Blazor.Chat

Assembly: DevExpress.AIIntegration.Blazor.Chat.v24.2.dll

NuGet Package: DevExpress.AIIntegration.Blazor.Chat

#Declaration

C#
[Parameter]
public ResponseContentFormat ResponseContentFormat { get; set; }

#Property Value

Type Description
ResponseContentFormat

Content format.

Available values:

Name Description
Markdown

An assistant sends the response as Markdown.

PlainText

An assistant sends the response as plain text.

#Remarks

The AI service uses plain text as the default response format. To display rich formatted messages, set the ResponseContentFormat property to Markdown and use a markdown processor to convert the response content to HTML code.

razor
@using Markdig;
<style>
    .demo-chat {
        width: 100%;
        height: 400px;
    }
</style>

<DxAIChat CssClass="demo-chat" ResponseContentFormat="ResponseContentFormat.Markdown">
    <MessageContentTemplate>
            @ToHtml(context.Content)
    </MessageContentTemplate>
</DxAIChat>

@code {
    MarkupString ToHtml(string text) {
        return (MarkupString)Markdown.ToHtml(text);
    }
}

Rich formatter content in AI Chat

See Also