Skip to content

Commit 490e18e

Browse files
committed
update example
1 parent 1f5590a commit 490e18e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Diff for: CS/JSDocumentViewer/Program.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using Azure;
21
using Azure.AI.OpenAI;
32
using DevExpress.AIIntegration;
43
using DevExpress.AspNetCore;
@@ -42,7 +41,7 @@
4241
new Uri(settings.AzureOpenAIEndpoint),
4342
new System.ClientModel.ApiKeyCredential(settings.AzureOpenAIKey)).AsChatClient(settings.DeploymentName);
4443

45-
builder.Services.AddChatClient(chatClient);
44+
builder.Services.AddSingleton(chatClient);
4645
builder.Services.AddDevExpressAI((config) => {
4746
config.AddWebReportingAIIntegration(cfg =>
4847
cfg.SummarizationMode = SummarizationMode.Abstractive);

Diff for: README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ These actions are also available in context menu when you select report content.
1515

1616
The following is an image of the application interface. As you can see, users can process the entire document, individual pages, or selected content.
1717

18-
![AI-Powered Summarize and Translate Buttons](web-reporting-ai-enhancements.png)
18+
![Web Document Viewer - AI-Powered Summarize and Translate Buttons](web-reporting-ai-enhancements.png)
1919

2020
## Implementation Details
2121

@@ -28,9 +28,9 @@ Add the following NuGet packages:
2828
- `Microsoft.Extensions.AI.OpenAI`, `Azure.AI.OpenAI`, `Azure.Identity` or `Microsoft.Extensions.AI.Ollama` based on your AI service preferences. This project uses Azure OpenAI. The remainder of this document describes steps related to this package.
2929

3030
> [!IMPORTANT]
31-
> We use version **9.3.0-preview.1.25161.3** of the _Microsoft.Extensions.AI.*_ libraries in our source code. We do not guarantee compatibility or correct operation with higher versions.
31+
> In v24.2.6+, we use version **9.3.0-preview.1.25161.3** of the _Microsoft.Extensions.AI.*_ libraries in our source code. We do not guarantee compatibility or correct operation with higher versions.
3232
33-
For the list of supported AI services and the corresponding prerequisites, refer to *Supported AI Services* in the following help topic: [AI-powered Extensions for DevExpress Reporting](https://docs.devexpress.com/XtraReports/405211/ai-powered-functionality/ai-for-devexpress-reporting?v=24.2#supported-ai-services
33+
For the list of supported AI services and the corresponding prerequisites, refer to *Supported AI Services* in the following help topic: [AI-powered Extensions for DevExpress Reporting](https://docs.devexpress.com/XtraReports/405211/ai-powered-functionality/ai-for-devexpress-reporting#supported-ai-services
3434
).
3535

3636
### Add Personal Keys
@@ -82,7 +82,7 @@ IChatClient chatClient = new AzureOpenAIClient(
8282
new Uri(settings.AzureOpenAIEndpoint),
8383
new System.ClientModel.ApiKeyCredential(settings.AzureOpenAIKey)).AsChatClient(settings.DeploymentName);
8484

85-
builder.Services.AddChatClient(config => config.Use(chatClient));
85+
builder.Services..AddSingleton(chatClient);
8686
builder.Services.AddDevExpressAI((config) => {
8787
config.AddWebReportingAIIntegration(cfg =>
8888
cfg.SummarizationMode = SummarizationMode.Abstractive);
@@ -125,8 +125,8 @@ Open `DocumentViewer.cshtml` and create a JavaScript function that enables AI se
125125

126126
## Documentation
127127

128-
- [AI-powered Extensions for DevExpress Reporting](https://docs.devexpress.com/XtraReports/405211/ai-powered-functionality/ai-for-devexpress-reporting?v=24.2)
129-
- [Summarize and Translate Reports in the Web Document Viewer](https://docs.devexpress.com/XtraReports/405196/ai-powered-functionality/summarize-translate-in-web-viewer?v=24.2)
128+
- [AI-powered Extensions for DevExpress Reporting](https://docs.devexpress.com/XtraReports/405211/ai-powered-functionality/ai-for-devexpress-reporting)
129+
- [Summarize and Translate Reports in the Web Document Viewer](https://docs.devexpress.com/XtraReports/405196/ai-powered-functionality/summarize-translate-in-web-viewer)
130130

131131
## More Examples
132132

0 commit comments

Comments
 (0)