You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -119,18 +119,48 @@ The following code snippet adds the [`DxAIChat`](https://docs.devexpress.com/Bla
119
119
}
120
120
```
121
121
122
-
Use the [`MessageContentTemplate`](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.DxAIChat.MessageContentTemplate) property to display rich-formatted messages. Use a markdown processor to convert response content to HTML code.
122
+
Use the [`MessageContentTemplate`](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.DxAIChat.MessageContentTemplate) property to display rich-formatted messages. Use a markdown processor to convert response content to HTML code.
In this example, the `AIAssistantCreator.CreateAssistantAsync` method creates an assistant with the specified [options](https://learn.microsoft.com/en-us/dotnet/api/azure.ai.openai.assistants.assistantcreationoptions?view=azure-dotnet-preview) and a thread. The
131
+
132
+
You can review and tailor AI assistant instructions in the following file: [Instructions.cs](./CS/DevExpress.AI.Samples.Blazor/Instructions.cs).
133
+
134
+
For information on OpenAI Assistants, refer to the following documents:
135
+
-[OpenAI Assistants API overview](https://platform.openai.com/docs/assistants/overview)
136
+
-[Azure OpenAI: OpenAI Assistants client library for .NET](https://learn.microsoft.com/en-us/dotnet/api/overview/azure/ai.openai.assistants-readme?view=azure-dotnet-preview)
137
+
138
+
In the *Program.cs* file, add the `AIAssistantCreator` service to the applications's service collection:
Handle the `OnAfterRenderAsync` event and call the [`SetupAssistantAsync`](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.IAIChat.SetupAssistantAsync(DevExpress.AIIntegration.Services.Assistant.AIAssistantOptions)) method to create your AI assistant and provide it with data and instructions. This example calls our Blazor Grid's [`ExportToXlsxAsync`](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGrid.ExportToXlsxAsync.overloads) method to generate data for the AI Assistant.
159
+
Handle the `OnAfterRenderAsync` event and call the [`SetupAssistantAsync`](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.IAIChat.SetupAssistantAsync(System.String-System.String)?v=25.1) method to set up your AI assistant based on the Assistant's ID and thread's ID created in the previous step. This example calls our Blazor Grid's [`ExportToXlsxAsync`](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGrid.ExportToXlsxAsync.overloads) method to generate data for the AI Assistant.
131
160
132
161
```razor
133
162
@using DevExpress.AIIntegration.OpenAI.Services
163
+
@inject AIAssistantCreator assistantCreator;
134
164
135
165
@* ... *@
136
166
@code {
@@ -142,10 +172,13 @@ Handle the `OnAfterRenderAsync` event and call the [`SetupAssistantAsync`](https
142
172
await grid.ExportToXlsxAsync(ms, new GridXlExportOptions() {
@@ -157,12 +190,10 @@ Handle the `OnAfterRenderAsync` event and call the [`SetupAssistantAsync`](https
157
190
158
191
You can review and tailor AI assistant instructions in the following file: [Instructions.cs](./CS/DevExpress.AI.Samples.Blazor/Instructions.cs).
159
192
160
-
For information on OpenAI Assistants, refer to the following document: [Assistants API overview](https://platform.openai.com/docs/assistants/overview).
In this example, the `AIAssistantCreator.CreateAssistantAsync` method creates an assistant with the specified [options](https://learn.microsoft.com/en-us/dotnet/api/azure.ai.openai.assistants.assistantcreationoptions?view=azure-dotnet-preview) and a thread. The
279
+
280
+
You can review and tailor AI assistant instructions in the following file: [Instructions.cs](./CS/DevExpress.AI.Samples.Blazor/Instructions.cs).
281
+
282
+
For information on OpenAI Assistants, refer to the following documents:
283
+
-[OpenAI Assistants API overview](https://platform.openai.com/docs/assistants/overview)
284
+
-[Azure OpenAI: OpenAI Assistants client library for .NET](https://learn.microsoft.com/en-us/dotnet/api/overview/azure/ai.openai.assistants-readme?view=azure-dotnet-preview)
285
+
286
+
In the *Program.cs* file, add the `AIAssistantCreator` service to the applications's service collection:
Handle the [`Initialized`](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.DxAIChat.Initialized) event and call the [`SetupAssistantAsync`](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.IAIChat.SetupAssistantAsync(DevExpress.AIIntegration.Services.Assistant.AIAssistantOptions)) method to create your AI assistant and provide it with data and instructions. This example calls the [`ExportToPdf`](https://docs.devexpress.com/CoreLibraries/DevExpress.XtraPrinting.PrintingSystemBase.ExportToPdf(System.IO.Stream)) method to generate data for the AI Assistant:
307
+
Handle the [`Initialized`](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.DxAIChat.Initialized) event and call the [`SetupAssistantAsync`](https://docs.devexpress.com/Blazor/DevExpress.AIIntegration.Blazor.Chat.IAIChat.SetupAssistantAsync(System.String-System.String)?v=25.1) method method to set up your AI assistant based on the Assistant's ID and thread's ID created in the previous step. This example calls the [`ExportToPdf`](https://docs.devexpress.com/CoreLibraries/DevExpress.XtraPrinting.PrintingSystemBase.ExportToPdf(System.IO.Stream)) method to generate data for the AI Assistant:
0 commit comments