AIPromptToReportConverterConfigurationBuilder.ConfigurePredefinedPrompts(Action<List<AIReportPrompt>>) Method
Allows you to modify the collection of predefined prompts shown in the Report Wizard.
Namespace: DevExpress.AspNetCore.Reporting
Assembly: DevExpress.AIIntegration.AspNetCore.Reporting.v25.1.dll
NuGet Package: DevExpress.AIIntegration.AspNetCore.Reporting
Declaration
public AIPromptToReportConverterConfigurationBuilder ConfigurePredefinedPrompts(
Action<List<AIReportPrompt>> action
)
Parameters
Name | Type | Description |
---|---|---|
action | Action<List<AIReportPrompt>> | A collection of predefined prompts. |
Returns
Type | Description |
---|---|
AIPromptToReportConverterConfigurationBuilder | An AIPromptToReportConverterConfigurationBuilder object that can be used to further configure the AI-powered Prompt-to-Report functionality in Web Report Designer. |
Remarks
You can add your custom prompt to be shown in the Predefined Prompts section in Report Wizard. You can also remove DevExpress built-in predefined prompts or change their Title and Text properties.
The following code snippet removes all DevExpress built-in prompts and adds two custom prompts:
using DevExpress.AspNetCore.Reporting;
using DevExpress.AIIntegration.Reporting;
//...
builder.Services.AddDevExpressAI(config => {
config.AddWebReportingAIIntegration(aiConfig => {
aiConfig
.AddPromptToReportConverter(options => {
options.ConfigurePredefinedPrompts(prompts => {
prompts.Clear();
prompts.Add(new AIReportPrompt {
Title = "Custom Prompt 1",
Text = "Custom Prompt Text"
});
prompts.Add(new AIReportPrompt {
Title = "Custom Prompt 2",
Text = "Custom Prompt Text"
});
});
});
});
});
The following images shows the resulting Enter Report Description page in the Report Wizard: