SmoothLingua 1.0.6
dotnet add package SmoothLingua --version 1.0.6
NuGet\Install-Package SmoothLingua -Version 1.0.6
<PackageReference Include="SmoothLingua" Version="1.0.6" />
paket add SmoothLingua --version 1.0.6
#r "nuget: SmoothLingua, 1.0.6"
// Install SmoothLingua as a Cake Addin #addin nuget:?package=SmoothLingua&version=1.0.6 // Install SmoothLingua as a Cake Tool #tool nuget:?package=SmoothLingua&version=1.0.6
SmoothLingua
SmoothLingua is an open-source conversational AI platform that empowers you to create and deploy intelligent conversational agents. It offers a versatile and customizable framework for building smart chatbots capable of comprehending and responding to user input.
Features
Intent Recognition: Train your model to recognize user intents, such as greetings, farewells, inquiries, and more.
Story Management: Define conversation flows using stories, specifying sequences of intents and corresponding bot responses.
Rule-Based Responses: Create rules to handle specific scenarios and ensure precise responses.
Trainer Module: Train your conversational agent with ease using the built-in trainer module.
Extensibility: Extend SmoothLingua to integrate with your existing systems and services.
Build status
Quick Start
Installation
Install SmoothLingua via NuGet Package Manager Console:
Install-Package SmoothLingua
Example
using SmoothLingua;
using SmoothLingua.Abstractions;
using SmoothLingua.Abstractions.Stories;
MemoryStream memoryStream = new MemoryStream();
Trainer trainer = new Trainer();
trainer.Train(new Domain(
new List<SmoothLingua.Abstractions.NLU.Intent>()
{
new SmoothLingua.Abstractions.NLU.Intent("Greeting",
new List<string>(){ "Hello", "Hi" }),
new SmoothLingua.Abstractions.NLU.Intent("Good",
new List<string>(){ "I am fine", "I am good, thank you" }),
new SmoothLingua.Abstractions.NLU.Intent("Bad",
new List<string>(){ "I am feeling bad", "I am not good" }),
new SmoothLingua.Abstractions.NLU.Intent("Bye",
new List<string>(){ "Good bye", "Bye" })
},
new List<Story>()
{
new Story("Good", new List<SmoothLingua.Abstractions.Stories.Step>()
{
new IntentStep("Greeting"),
new ResponseStep("Hello from bot!"),
new IntentStep("Good"),
new ResponseStep("I am glad to hear that!")
}),
new Story("Bad", new List<SmoothLingua.Abstractions.Stories.Step>()
{
new IntentStep("Greeting"),
new ResponseStep("Hello from bot!"),
new IntentStep("Bad"),
new ResponseStep("I am sorry to hear that!")
})
},
new List<SmoothLingua.Abstractions.Rules.Rule>()
{
new SmoothLingua.Abstractions.Rules.Rule("Bye","Bye","Bye")
}
), memoryStream).Wait();
var conversationId = Guid.NewGuid().ToString();
var agent = await AgentLoader.Load(new MemoryStream(memoryStream.GetBuffer()));
var response = agent.Handle(conversationId, "bye");
Console.WriteLine($"Intent:{response.IntentName}");
foreach (var text in response.Messages)
{
Console.WriteLine($"Response:{text}");
}
response = agent.Handle(conversationId, "hello");
Console.WriteLine($"Intent:{response.IntentName}");
foreach (var text in response.Messages)
{
Console.WriteLine($"Response:{text}");
}
response = agent.Handle(conversationId, "I am fine");
Console.WriteLine($"Intent:{response.IntentName}");
foreach (var text in response.Messages)
{
Console.WriteLine($"Response:{text}");
}
response = agent.Handle(conversationId, "hello");
Console.WriteLine($"Intent:{response.IntentName}");
foreach (var text in response.Messages)
{
Console.WriteLine($"Response:{text}");
}
response = agent.Handle(conversationId, "I am bad");
Console.WriteLine($"Intent:{response.IntentName}");
foreach (var text in response.Messages)
{
Console.WriteLine($"Response:{text}");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- Microsoft.ML (>= 3.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.6 | 147 | 3/16/2024 |
1.0.5 | 129 | 3/9/2024 |
1.0.4 | 124 | 2/18/2024 |
1.0.3 | 146 | 1/13/2024 |
1.0.2-alpha | 127 | 1/4/2024 |
1.0.1-alpha | 101 | 1/3/2024 |
1.0.0-alpha | 117 | 12/31/2023 |