AIServicesEnabled Function
Enables AI-powered Summarize and Translate features in the Web Document Viewer.
#Declaration
export const AIServicesEnabled: DevExpress.Analytics.Internal.IGlobalSubscribableValue<boolean>
#Parameters
Name | Type | Description |
---|---|---|
new |
boolean |
|
#Returns
Type |
---|
boolean |
#Remarks
To enable the DevExpress AI-powered extension for the Web Document Viewer, call the AddWebReportingAIIntegration on application startup and set the AIServicesEnabled
property to true
on the client.
For additional information, refer to the following article: Summarize and Translate Reports in the Web Document Viewer.
#Example
The following code snippets enable the DevExpress AI-powered Extension for the Web Document Viewer in an ASP.NET Core application:
In the Program.cs file, call the
AddDevExpressAI
andAddWebReportingAIIntegration
methods to register an AI service.csusing Microsoft.Extensions.AI; using System; IChatClient asChatClient = new Azure.AI.OpenAI.AzureOpenAIClient(new Uri(AzureOpenAIEndpoint), new System.ClientModel.ApiKeyCredential(AzureOpenAIKey)) .AsChatClient("GPT4o"); builder.Services.AddSingleton(asChatClient); builder.Services.AddDevExpressAI((config) => { config.AddWebReportingAIIntegration(options => options.SummarizationMode = SummarizationMode.Abstractive); });
On the page with the Document Viewer, set the
AIServicesEnabled
property totrue
and use the AILanguages property to specify languages for Summarize and Translate operations:cshtml<script> function OnInitializing(e, s) { DevExpress.Reporting.Viewer.Settings.AIServicesEnabled(true); DevExpress.Reporting.Viewer.Settings.AILanguages([ { key: 'en', text: 'English' }, { key: 'es', text: 'Spanish' }, { key: 'de', text: 'German' } ]); } </script> @{ var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer") .ClientSideEvents((configure) => { configure.OnInitializing("OnInitializing"); }) .Height("100%") .Bind(Model); @viewerRender.RenderHtml() }
The AI Operations tab appears in the tab panel and AI-powered context menu items are available to users:
AI Operations tab | AI-powered Quick Actions |
---|---|
![]() |
![]() |
The AI Operations tab allows you to do the following:
- Select input text range for Summarize and Translate operations (Document, Selected Pages, or Selected Report Content)
- Select a language for Summarize and Translate operations
- Review and copy operation output
The Quick Actions menu allows you to summarize and translate selected report content. Operation output is displayed in the AI Operations tab.
You can now translate and summarize any report using AI-powered tools.