Skip to content

Commit d96febb

Browse files
committed
Replace Articulate API, in progress.
1 parent e591a49 commit d96febb

40 files changed

Lines changed: 6273 additions & 17 deletions

‎BotSharp.Algorithm.UnitTest/BotSharp.Algorithm.UnitTest.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<IsPackable>false</IsPackable>
77

8-
<Configurations>Debug;Release;RASA NLU;DIALOGFLOW;RASA</Configurations>
8+
<Configurations>Debug;Release;RASA NLU;DIALOGFLOW;RASA;ARTICULATE</Configurations>
99

1010
<Platforms>AnyCPU;x64</Platforms>
1111
</PropertyGroup>

‎BotSharp.Algorithm/BotSharp.Algorithm.csproj‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
<Configurations>Debug;Release;RASA;DIALOGFLOW</Configurations>
5+
<Configurations>Debug;Release;RASA;DIALOGFLOW;ARTICULATE</Configurations>
66
<Platforms>AnyCPU;x64</Platforms>
77
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
88
<PackageIconUrl>https://raw.githubusercontent.com/Oceania2018/BotSharp/master/BotSharp.WebHost/wwwroot/images/BotSharp.png</PackageIconUrl>
@@ -24,4 +24,8 @@
2424
<Optimize>false</Optimize>
2525
</PropertyGroup>
2626

27+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ARTICULATE|AnyCPU'">
28+
<DefineConstants>TRACE;ARTICULATE</DefineConstants>
29+
</PropertyGroup>
30+
2731
</Project>

‎BotSharp.Core.UnitTest/BotSharp.Core.UnitTest.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<Platforms>AnyCPU;x64</Platforms>
99

10-
<Configurations>Debug;Release;RASA NLU;DIALOGFLOW;RASA</Configurations>
10+
<Configurations>Debug;Release;RASA NLU;DIALOGFLOW;RASA;ARTICULATE</Configurations>
1111
</PropertyGroup>
1212

1313
<ItemGroup>

‎BotSharp.Core/BotSharp.Core.csproj‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<SccAuxPath>SAK</SccAuxPath>
77
<SccLocalPath>SAK</SccLocalPath>
88
<Platforms>AnyCPU;x64</Platforms>
9-
<Configurations>Debug;Release;DIALOGFLOW;RASA</Configurations>
9+
<Configurations>Debug;Release;DIALOGFLOW;RASA;ARTICULATE</Configurations>
1010
</PropertyGroup>
1111

1212
<PropertyGroup>
@@ -50,6 +50,11 @@ If you feel that this project is helpful to you, please Star on the project, we
5050
<Optimize>false</Optimize>
5151
</PropertyGroup>
5252

53+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ARTICULATE|AnyCPU'">
54+
<DefineConstants>DEBUG;TRACE;ARTICULATE</DefineConstants>
55+
<Optimize>false</Optimize>
56+
</PropertyGroup>
57+
5358
<ItemGroup>
5459
<PackageReference Include="Colorful.Console" Version="1.2.9" />
5560
<PackageReference Include="DotNetToolkit" Version="1.6.0" />
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace BotSharp.Core.Engines.Articulate
6+
{
7+
public class AgentModel
8+
{
9+
public int Id { get; set; }
10+
11+
public string Status { get; set; }
12+
13+
public string Timezone { get; set; }
14+
15+
public string Language { get; set; }
16+
17+
public string AgentName { get; set; }
18+
19+
public bool UseWebhook { get; set; }
20+
21+
public string Description { get; set; }
22+
23+
public bool UsePostFormat { get; set; }
24+
25+
public bool ExtraTrainingData { get; set; }
26+
27+
public List<String> FallbackResponses { get; set; }
28+
29+
public bool EnableModelsPerDomain { get; set; }
30+
31+
public decimal DomainClassifierThreshold { get; set; }
32+
}
33+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace BotSharp.Core.Engines.Articulate
6+
{
7+
public class DomainModel
8+
{
9+
public int Id { get; set; }
10+
11+
public string Agent { get; set; }
12+
13+
public string DomainName { get; set; }
14+
15+
public bool Enabled { get; set; }
16+
17+
public bool ExtraTrainingData { get; set; }
18+
19+
public decimal IntentThreshold { get; set; }
20+
21+
public string Status { get; set; }
22+
}
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace BotSharp.Core.Engines.Articulate
6+
{
7+
public class EntityModel
8+
{
9+
public int Id { get; set; }
10+
11+
public string Regex { get; set; }
12+
13+
public string Agent { get; set; }
14+
15+
public string EntityName { get; set; }
16+
17+
public string Type { get; set; }
18+
19+
public string UiColor { get; set; }
20+
21+
public List<EntitySynonymModel> Examples { get; set; }
22+
}
23+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace BotSharp.Core.Engines.Articulate
6+
{
7+
public class EntitySynonymModel
8+
{
9+
public string Value { get; set; }
10+
11+
public List<String> Synonyms { get; set; }
12+
}
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace BotSharp.Core.Engines.Articulate
6+
{
7+
public class IntentExampleModel
8+
{
9+
public string userSays { get; set; }
10+
11+
public List<ArticulateTrainingIntentExpressionPart> Entities { get; set; }
12+
}
13+
14+
public class ArticulateTrainingIntentExpressionPart : TrainingIntentExpressionPart
15+
{
16+
public int EntityId { get; set; }
17+
}
18+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace BotSharp.Core.Engines.Articulate
6+
{
7+
public class IntentModel
8+
{
9+
public int Id { get; set; }
10+
11+
public string IntentName { get; set; }
12+
13+
public string Agent { get; set; }
14+
15+
public string Domain { get; set; }
16+
17+
public bool UsePostFormat { get; set; }
18+
19+
public bool UseWebhook { get; set; }
20+
21+
public List<IntentExampleModel> Examples { get; set; }
22+
}
23+
}

0 commit comments

Comments
 (0)