Skip to content

Commit 85bfa6d

Browse files
authored
Update README.md
1 parent 8443f18 commit 85bfa6d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!-- default badges end -->
77
# Reporting for ASP.NET Core - Integrate AI Assistant based on Azure OpenAI
88

9-
This example is an ASP.NET Core application with integrated DevExpress Reports and an AI assistant. User requests and assistant responses are displayed on-screen using the DevExtreme `dxChat` component.
9+
This example is an ASP.NET Core application with integrated DevExpress Reports and an AI assistant. User requests and assistant responses are displayed on-screen using the DevExtreme [`dxChat`](https://js.devexpress.com/jQuery/Documentation/24_2/ApiReference/UI_Components/dxChat/) component.
1010

1111
The AI assistant's role depends on the associated DevExpress Reports component:
1212

@@ -26,7 +26,7 @@ The AI assistant's role depends on the associated DevExpress Reports component:
2626
2727
You need to create an Azure OpenAI resource in the Azure portal to use AI Assistants for DevExpress Reporting. Refer to the following help topic for details: [Microsoft - Create and deploy an Azure OpenAI Service resource](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal).
2828

29-
Once you obtain a private endpoint and an API key, register them as `OPENAI_ENDPOINT` and `OPENAI_APIKEY` environment variables. The [EnvSettings.cs](./CS/ReportingApp/EnvSettings.cs) reads these settings. `DeploymentName` in this file is a name of your Azure model, for example, `GPT4o`:
29+
Once you obtain a private endpoint and an API key, register them as `AZURE_OPENAI_ENDPOINT` and `AZURE_OPENAI_APIKEY` environment variables. The [EnvSettings.cs](./CS/ReportingApp/EnvSettings.cs) reads these settings. `DeploymentName` in this file is a name of your Azure model, for example, `GPT4o`:
3030

3131
```cs
3232
public static class EnvSettings {
@@ -134,16 +134,17 @@ async function DocumentReady(sender, args) {
134134
}
135135
```
136136

137-
The [PerformCustomDocumentOperation](https://docs.devexpress.com/XtraReports/js-ASPxClientWebDocumentViewer?p=netframework#js_aspxclientwebdocumentviewer_performcustomdocumentoperation) method exports the report to PDF and creates an assistant based on the exported document. See [AIDocumentOperationService.cs]() for implementation details.
137+
The [`PerformCustomDocumentOperation`](https://docs.devexpress.com/XtraReports/js-ASPxClientWebDocumentViewer?p=netframework#js_aspxclientwebdocumentviewer_performcustomdocumentoperation) method exports the report to PDF and creates an assistant based on the exported document. See [AIDocumentOperationService.cs](./CS/ReportingApp/Services/AIDocumentOperationService.cs) for implementation details.
138138

139139
#### Communicate with the Assistant
140140

141-
Each time a user sends a message, the `onMessageSend` event handler passes the request to the assistant:
141+
Each time a user sends a message, the [`onMessageEntered`](https://js.devexpress.com/jQuery/Documentation/24_2/ApiReference/UI_Components/dxChat/Configuration/#onMessageEntered) event handler passes the request to the assistant:
142142

143143
```js
144144
//...
145-
onMessageSend: (e) => {
145+
onMessageEntered: (e) => {
146146
const instance = e.component;
147+
instance.renderMessage(e.message);
147148
const formData = new FormData();
148149
formData.append('text', e.message.text);
149150
formData.append('chatId', model.chatId);
@@ -237,12 +238,13 @@ public async Task<string> CreateAssistant(AssistantType assistantType, Stream da
237238
```
238239
#### Communicate with the Assistant
239240

240-
Each time a user sends a message, the `onMessageSend` event handler passes the request to the assistant:
241+
Each time a user sends a message, the [`onMessageEntered`](https://js.devexpress.com/jQuery/Documentation/24_2/ApiReference/UI_Components/dxChat/Configuration/#onMessageEntered) event handler passes the request to the assistant:
241242

242243
```js
243244
//...
244-
onMessageSend: (e) => {
245+
onMessageEntered: (e) => {
245246
const instance = e.component;
247+
instance.renderMessage(e.message);
246248
const formData = new FormData();
247249
formData.append('text', e.message.text);
248250
formData.append('chatId', model.chatId);
@@ -276,10 +278,11 @@ onMessageSend: (e) => {
276278

277279
## More Examples
278280

281+
- [DevExtreme Chat - Getting Started](https://github.com/DevExpress-Examples/devextreme-getting-started-with-chat)
279282
- [Reporting for ASP.NET Core - Summarize and Translate DevExpress Reports Using Azure OpenAI](https://github.com/DevExpress-Examples/reporting-asp-net-core-ai-summarize-and-translate)
280283
- [Reporting for Blazor - Integrate AI-powered Summarize and Translate Features based on Azure OpenAI](https://github.com/DevExpress-Examples/blazor-reporting-ai/)
281-
- [Rich Text Editor and HTML Editor for Blazor - How to integrate AI-powered extensions](https://github.com/DevExpress-Examples/blazor-ai-integration-to-text-editors)
282284
- [AI Chat for Blazor - How to add DxAIChat component in Blazor, MAUI, WPF, and WinForms applications](https://github.com/DevExpress-Examples/devexpress-ai-chat-samples)
285+
- [Rich Text Editor and HTML Editor for Blazor - How to integrate AI-powered extensions](https://github.com/DevExpress-Examples/blazor-ai-integration-to-text-editors)
283286

284287
<!-- feedback -->
285288
## Does this example address your development requirements/objectives?

0 commit comments

Comments
 (0)