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
@@ -26,52 +26,120 @@ To enable AI functionality in your .NET MAUI Scheduler, first ensure that you ha
26
26
27
27
### Step 3: Connect to the Azure OpenAI
28
28
29
-
To connect your .NET MAUI app to Azure OpenAI, create a service class that handles communication with the AI model. Start by initializing the OpenAIClient using your Azure endpoint and API key.
29
+
To connect your .NET MAUI app to Azure OpenAI, create a service class that handles communication with the AI model.
30
30
31
-
In this service, define a method called GetAnswerFromGPT. This method takes a user prompt as input, sends it to the deployed model, and returns the AI-generated response.
31
+
```
32
+
/// <summary>
33
+
/// Helper class to interact with Azure AI.
34
+
/// </summary>
35
+
internal class AzureOpenAIServiceConnector : AzureBaseService
36
+
{
37
+
38
+
}
39
+
```
40
+
41
+
In this service, define a method called `GetAnswerFromGPT`. This method takes a user prompt from the SfAIAssistView control as input, sends it to the deployed model (e.g., GPT35Turbo), and returns the AI-generated response.
42
+
43
+
```
44
+
/// <summary>
45
+
/// Helper class to interact with Azure AI.
46
+
/// </summary>
47
+
internal class AzureOpenAIServiceConnector : AzureBaseService
48
+
{
49
+
50
+
/// <summary>
51
+
/// Retrieves an answer from the deployment name model using the provided user prompt.
52
+
/// </summary>
53
+
/// <param name="userPrompt">The user prompt.</param>
0 commit comments