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
Copy file name to clipboardExpand all lines: MAUI/Autocomplete/AI-Powered-Smart-Searching.md
+4-32Lines changed: 4 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,38 +43,8 @@ In the `GetCompletion` method, we will construct the prompt and send it to the A
43
43
44
44
public AzureBaseService()
45
45
{
46
-
ValidateCredential();
47
46
}
48
47
49
-
private async void ValidateCredential()
50
-
{
51
-
this.GetAzureOpenAIKernal();
52
-
53
-
if (isAlreadyValidated)
54
-
{
55
-
return;
56
-
}
57
-
58
-
try
59
-
{
60
-
if (Client != null)
61
-
{
62
-
await Client!.CompleteAsync("Hello, Test Check");
63
-
ChatHistory = string.Empty;
64
-
IsCredentialValid = true;
65
-
isAlreadyValidated = true;
66
-
}
67
-
else
68
-
{
69
-
ShowAlertAsync();
70
-
}
71
-
}
72
-
catch (Exception)
73
-
{
74
-
return;
75
-
}
76
-
}
77
-
78
48
/// <summary>
79
49
/// To get the Azure open ai kernal method
80
50
/// </summary>
@@ -210,7 +180,7 @@ The logic within [Autocomplete](https://help.syncfusion.com/cr/maui/Syncfusion.M
210
180
To get accurate and structured results from the AI, we must provide a detailed prompt. This is constructed inside the
211
181
`FilterCountriesUsingAzureAI` method.
212
182
213
-
The `FilterCountriesUsingAzureAI` method uses prompt engineering to instruct the AI on how to filter the results, including asking it to handle spelling mistakes and providing the response in a clean, parsable format.
183
+
The `FilterCountriesUsingAzureAI` method uses prompt engineering to instruct the AI on how to filter the results, including asking it to handle spelling mistakes and providing the response in a clean format.
214
184
215
185
{% tabs %}
216
186
{% highlight c# %}
@@ -336,7 +306,7 @@ public class CustomFilter : IAutocompleteFilterBehavior
336
306
337
307
{% endtabs %}
338
308
339
-
**Step:3** Applying Custom Filtering to AutoComplte
309
+
**Step:3** Applying Custom Filtering to AutoComplete
340
310
341
311
Applying custom filtering to the [Autocomplete](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Inputs.SfAutocomplete.html) control by using the `FilterBehavior` property.
342
312
@@ -363,4 +333,6 @@ The following image demonstrates the output of the above AI-based search using a
363
333
364
334

365
335
336
+
You can find the complete sample from this [link](https://github.com/SyncfusionExamples/Smart-AI-Searching-using-.NET-MAUI-Autocomplete).
337
+
366
338
By combining a powerful AI-driven online search with a robust you can create a truly smart and reliable search experience in your .NET MAUI applications.
Copy file name to clipboardExpand all lines: MAUI/ComboBox/AI-Powered-Smart-Searching.md
+2-29Lines changed: 2 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,36 +43,7 @@ In the `GetCompletion` method, we will construct the prompt and send it to the A
43
43
44
44
public AzureBaseService()
45
45
{
46
-
ValidateCredential();
47
-
}
48
-
49
-
private async void ValidateCredential()
50
-
{
51
-
this.GetAzureOpenAIKernal();
52
-
53
-
if (isAlreadyValidated)
54
-
{
55
-
return;
56
-
}
57
46
58
-
try
59
-
{
60
-
if (Client != null)
61
-
{
62
-
await Client!.CompleteAsync("Hello, Test Check");
63
-
ChatHistory = string.Empty;
64
-
IsCredentialValid = true;
65
-
isAlreadyValidated = true;
66
-
}
67
-
else
68
-
{
69
-
ShowAlertAsync();
70
-
}
71
-
}
72
-
catch (Exception)
73
-
{
74
-
return;
75
-
}
76
47
}
77
48
78
49
/// <summary>
@@ -346,4 +317,6 @@ The following image demonstrates the output of the above AI-based search using a
346
317
347
318

348
319
320
+
You can find the complete sample from this [link.
321
+
349
322
By combining a powerful AI-driven online search with a robust you can create a truly smart and reliable search experience in your .NET MAUI applications.
0 commit comments