MessageSendingEventArgs.Chat Property
Returns the current AI Chat component.
Namespace: DevExpress.AIIntegration.Blazor.Chat
Assembly: DevExpress.AIIntegration.Blazor.Chat.v26.1.dll
Declaration
public IAIChat Chat { get; }
Property Value
| Type | Description |
|---|---|
| IAIChat | An object that implements the |
Remarks
Use the Chat property to access properties and methods of the current AI Chat component.
The following code snippet adds a system instruction to the chat:
<DxAIChat MessageSending="OnMessageSending" />
@code {
private async Task OnMessageSending(MessageSendingEventArgs args) {
await args.Chat.AppendMessageAsync("Translate text to Spanish", ChatRole.System);
}
}
See Also