intent detail fix
This commit is contained in:
parent
a858e1c4f8
commit
33d6aa1f2a
|
|
@ -20,6 +20,7 @@
|
|||
<Version>1.1.0</Version>
|
||||
<PackageReleaseNotes>Support Rasa NLU 0.12.x</PackageReleaseNotes>
|
||||
<Copyright>Since 2018 Haiping Chen</Copyright>
|
||||
<PackageProjectUrl>https://github.com/Oceania2018/BotSharp</PackageProjectUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,11 @@ namespace BotSharp.Core.Intents
|
|||
|
||||
public static String CreateIntent(this Agent agent, Database dc, Intent intent)
|
||||
{
|
||||
if (String.IsNullOrEmpty(intent.Id))
|
||||
{
|
||||
intent.Id = Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
if (dc.Table<Intent>().Any(x => x.Id == intent.Id)) return intent.Id;
|
||||
|
||||
dc.Table<Intent>().Add(intent);
|
||||
|
|
|
|||
Loading…
Reference in a new issue