AIChatControl.SetResources(IEnumerable<AIChatResource>) Method
Specifies a collection of resources that supply external or dynamically generated data to the AI model.
Namespace: DevExpress.AIIntegration.WinForms.Chat
Assembly: DevExpress.AIIntegration.WinForms.Chat.v26.1.dll
NuGet Package: DevExpress.AIIntegration.WinForms.Chat
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| resources | IEnumerable<AIChatResource> | A collection of AIChatResource objects. |
Remarks
The AIChatControl can access external or dynamically generated data through resources. A resource is an instance of the AIChatResource class that supplies text or binary content to the AI model at request time.
After you assign resources, the AIChatControl displays the “Attach Context” (+) button. Users can select one or more resources to include in the chat request.

Example
The following example assigns a collection of resources to the AI Chat Control:
using System.Collections.Generic;
using DevExpress.AIIntegration.Blazor.Chat;
aiChatControl1.SetResources(new List<AIChatResource> {
new AIChatResource(
"access.txt",
"Access Log",
GetLogResourceAsync,
"text/plain",
"Contains web server access records collected over the last 24 hours.")
});
Call the SetResourceItemTemplate method to customize the appearance of resource entries.
Refer to the following help topic for additional information: Resources