AIChatControl.AppendMessageAsync(String, ChatRole, List<IAIChatMessageContextItem>) Method
Adds a message to chat history.
Namespace: DevExpress.AIIntegration.Wpf.Chat
Assembly: DevExpress.AIIntegration.Wpf.Chat.v26.1.dll
NuGet Package: DevExpress.AIIntegration.Wpf.Chat
Declaration
public Task AppendMessageAsync(
string text,
ChatRole role,
List<IAIChatMessageContextItem> contexts = null
)
Parameters
| Name | Type | Description |
|---|---|---|
| text | String | The message text. |
| role | Microsoft.Extensions.AI.ChatRole | The intended purpose of the message within a chat interaction. |
Optional Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| contexts | List<IAIChatMessageContextItem> | null | A collection of context items associated with the message. |
Returns
| Type | Description |
|---|---|
| Task | A task that represents the asynchronous operation. |
Remarks
Refer to the following help topic for additional information: AI Chat Control
See Also