AIChatExtensions.ToChatMessages(IEnumerable<BlazorChatMessage>) Method
Converts BlazorChatMessage objects to Microsoft.Extensions.AI.ChatMessage
objects.
Namespace: DevExpress.AIIntegration.Blazor.Chat
Assembly: DevExpress.AIIntegration.Blazor.Chat.v24.2.dll
NuGet Package: DevExpress.AIIntegration.Blazor.Chat
Declaration
public static IEnumerable<ChatMessage> ToChatMessages(
this IEnumerable<BlazorChatMessage> messages
)
Parameters
Name | Type | Description |
---|---|---|
messages | IEnumerable<BlazorChatMessage> | A collection of BlazorChatMessage objects. |
Returns
Type | Description |
---|---|
IEnumerable<Microsoft.Extensions.AI.ChatMessage> | A collection of |
Remarks
The DxAIChat component operates with BlazorChatMessage objects while AI services operate with Microsoft.Extensions.AI.ChatMessage
objects. Use the ToBlazorChatMessages(IEnumerable<ChatMessage>) and ToChatMessages(IEnumerable<BlazorChatMessage>)
methods to convert message types.
See Also