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.MessageSent Event

Fires after a user sends a message to the chat and allows you to manually process the message.

Namespace: DevExpress.AIIntegration.Blazor.Chat

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

NuGet Package: DevExpress.AIIntegration.Blazor.Chat

#Declaration

C#
[Parameter]
public EventCallback<MessageSentEventArgs> MessageSent { get; set; }

#Parameters

Type Description
MessageSentEventArgs

An object that contains data for this event.

#Remarks

When a user sends a message to the chat, the MessageSent event fires. Handle this event to process this action. You can use the Content event argument to access user input and call the Chat.SendMessage method to send another message to the chat.

razor
<DxAIChat MessageSent="MessageSent" />

@code {
    async Task MessageSent(MessageSentEventArgs args) {
        await args.Chat.SendMessage($"Processed: {args.Content}", ChatRole.Assistant);
    }
}

Run Demo: AI Chat - Manual Message Processing

See Also