WebsiteAIAssistant 3.1.0
dotnet add package WebsiteAIAssistant --version 3.1.0
NuGet\Install-Package WebsiteAIAssistant -Version 3.1.0
<PackageReference Include="WebsiteAIAssistant" Version="3.1.0" />
<PackageVersion Include="WebsiteAIAssistant" Version="3.1.0" />
<PackageReference Include="WebsiteAIAssistant" />
paket add WebsiteAIAssistant --version 3.1.0
#r "nuget: WebsiteAIAssistant, 3.1.0"
#:package WebsiteAIAssistant@3.1.0
#addin nuget:?package=WebsiteAIAssistant&version=3.1.0
#tool nuget:?package=WebsiteAIAssistant&version=3.1.0
Website AI Assistant
Library built using ML .NET, Microsoft's machine learning platform
Create and your own bespoke AI model and make predictions
AI Assistant helps visitors to your website, narrow down which of the offered products or services suits their needs.
| Packages | Version | Downloads |
|---|---|---|
| WebsiteAIAssistant.MinimalAPI | ||
| WebsiteAIAssistant.AzureFunction | ||
| WebsiteAIAssistant.AWSLambda |
Overview
Websites usually have sections that contain information about the various products or services offered by the website.
It may contain a list of the different products or services offered, along with descriptions and more information in other pages.
This AI Assistant can help visitors narrow down which of the website's products or services suits their needs,
by classifying the visitor's natural language and/or numeric based input into one of the categories of products or services offered by the website.
You can then provide more information about that category.
The API provided by the library let you create your bespoke AI model based on your training data
and then load your model and make predictions.
Documentation
You can solve real-world AI problems using the library API.
Car Category Classification Model
In this scenario, the classification into a category is done based on text & numeric training data.
The Car categories
public enum CarCategory
{
None = -1,
TwoDoorBasic = 0,
TwoDoorLuxury = 1,
FourDoorBasic = 2,
FourDoorLuxury = 3
}
The training data
It comprises of 2 tab-separated columns.
First is the Label (ie category) column & second is the Feature (text) column.
-1
0 2 door
0 basic
0 low price $ 20,000
0 mid price $ 25,000
0 high price $ 30,000
1 2 door
1 luxury
1 low price $ 40,000
1 mid price $ 45,000
1 high price $ 50,000
2 4 door
2 basic
2 low price $ 60,000
2 mid price $ 65,000
2 high price $ 70,000
3 4 door
3 luxury
3 low price $ 80,000
3 mid price $ 85,000
3 high price $ 90,000
The bespoke AI model is built using this training data using API provided by the library.
Then, that model is loaded & predictions are made.
The Unit tests on the model
An out of the box, ready to use helper service is provided to load the model & make predictions.
You can see the inputs to the model along with the predicted category.
[Theory]
[InlineData("price $ 42,000", CarCategory.TwoDoorLuxury)]
[InlineData("price $ 39,000", CarCategory.TwoDoorBasic)]
[InlineData("price $ 53,000", CarCategory.TwoDoorLuxury)]
[InlineData("4 door price $ 67,000", CarCategory.FourDoorBasic)]
[InlineData("luxury price $ 88,000", CarCategory.FourDoorLuxury)]
[InlineData("luxury price $ 62,000", CarCategory.TwoDoorLuxury)]
[InlineData("2 door price $ 29,000", CarCategory.TwoDoorBasic)]
[InlineData("low price $ 55,000", CarCategory.TwoDoorLuxury)]
[InlineData("high price $ 34,000", CarCategory.TwoDoorBasic)]
[InlineData("What is the colour of a rose?", CarCategory.None)]
public async Task Load_Predict_Service_CarCategory(string userInput, CarCategory expectedResult)
{
// Arrange
var aiAssistantService = _aiAssistantServiceProvider!.GetRequiredService<IWebsiteAIAssistantService>();
var input = new ModelInput { Feature = userInput };
// Act
var prediction = await aiAssistantService.PredictAsync(input);
// Assert
Assert.NotNull(prediction);
Assert.Equal(expectedResult, (CarCategory)prediction.PredictedLabel);
}
Read more here
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.ML (>= 5.0.0)
- Microsoft.ML (>= 5.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on WebsiteAIAssistant:
| Package | Downloads |
|---|---|
|
WebsiteAIAssistant.MinimalAPI
This is a Minimal API for a Website AI Assistant. It provides an endpoint for generating responses based on your website visitor's input. |
|
|
WebsiteAIAssistant.AzureFunction
This is an Azure Function for a Website AI Assistant. It provides an endpoint for generating responses based on your website visitor's input. |
|
|
WebsiteAIAssistant.AWSLambda
This is an AWS Lambda for a Website AI Assistant. It provides an endpoint for generating responses based on your website visitor's input. |
GitHub repositories
This package is not used by any popular GitHub repositories.
# Changelog (Release Notes)
- added options to control training dataset text
- provide custom stop words
- other enhancements