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
> We do not guarantee compatibility or correct operation with higher versions.
46
49
@@ -126,15 +129,16 @@ Use the [`MessageContentTemplate`](https://docs.devexpress.com/Blazor/DevExpress
126
129
127
130
#### Create an AI Assistant
128
131
129
-
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
132
+
In this example, the `AIAssistantCreator.CreateAssistantAsync` method uploads a file to OpenAI, configures tool resources, creates an assistant with specified instructions and tools, initializes a new thread, and returns the assistant and thread IDs.
130
133
131
134
You can review and tailor AI assistant instructions in the following file: [Instructions.cs](./CS/DevExpress.AI.Samples.Blazor/Instructions.cs).
132
135
133
136
For information on OpenAI Assistants, refer to the following documents:
134
137
-[OpenAI Assistants API overview](https://platform.openai.com/docs/assistants/overview)
135
138
-[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)
139
+
-[OpenAI .NET API library](https://github.com/openai/openai-dotnet)
136
140
137
-
In the *Program.cs* file, add the `AIAssistantCreator` service to the applications's service collection:
141
+
In the *Program.cs* file, add the `AIAssistantCreator` service to the application's service collection:
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.
163
+
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 and thread IDs 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.
159
164
160
165
```razor
161
166
@using DevExpress.AIIntegration.OpenAI.Services
@@ -189,7 +194,6 @@ Handle the `OnAfterRenderAsync` event and call the [`SetupAssistantAsync`](https
189
194
190
195
You can review and tailor AI assistant instructions in the following file: [Instructions.cs](./CS/DevExpress.AI.Samples.Blazor/Instructions.cs).
@@ -274,15 +278,16 @@ Use the [`MessageContentTemplate`](https://docs.devexpress.com/Blazor/DevExpress
274
278
275
279
#### Create an AI Assistant
276
280
277
-
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
281
+
In this example, the `AIAssistantCreator.CreateAssistantAsync` method uploads a file to OpenAI, configures tool resources, creates an assistant with specified instructions and tools, initializes a new thread, and returns the assistant and thread IDs.
278
282
279
283
You can review and tailor AI assistant instructions in the following file: [Instructions.cs](./CS/DevExpress.AI.Samples.Blazor/Instructions.cs).
280
284
281
285
For information on OpenAI Assistants, refer to the following documents:
282
286
-[OpenAI Assistants API overview](https://platform.openai.com/docs/assistants/overview)
283
287
-[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)
288
+
-[OpenAI .NET API library](https://github.com/openai/openai-dotnet)
284
289
285
-
In the *Program.cs* file, add the `AIAssistantCreator` service to the applications's service collection:
290
+
In the *Program.cs* file, add the `AIAssistantCreator` service to the application'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(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:
319
+
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 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