remove lang in response message.
This commit is contained in:
parent
79e641c4a8
commit
a858e1c4f8
|
|
@ -7,7 +7,6 @@ namespace BotSharp.Core.Adapters.Dialogflow
|
|||
{
|
||||
public class DialogflowIntentResponseMessage : AIResponseMessageBase
|
||||
{
|
||||
public string Lang { get; set; }
|
||||
public Object Speech { get; set; }
|
||||
public Object Payload { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,13 +12,14 @@
|
|||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>Haiping Chen</Authors>
|
||||
<Company />
|
||||
<Product>BotSharp</Product>
|
||||
<Product>BotSharp.Core</Product>
|
||||
<Description>.Net implementation of open chatbot platform like google Dialogflow. Modulized design supports different NLU engine as backend.</Description>
|
||||
<RepositoryType>MIT</RepositoryType>
|
||||
<RepositoryUrl>https://github.com/Oceania2018/BotSharp</RepositoryUrl>
|
||||
<PackageTags>NLU, Chatbot, Bot, AI Bot</PackageTags>
|
||||
<Version>1.1.0</Version>
|
||||
<PackageReleaseNotes>Support Rasa NLU 0.12.x</PackageReleaseNotes>
|
||||
<Copyright>Since 2018 Haiping Chen</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -107,7 +107,6 @@ namespace BotSharp.Core.Engines
|
|||
{
|
||||
return new IntentResponseMessage
|
||||
{
|
||||
Lang = x.Lang,
|
||||
Payload = JObject.FromObject(x.Payload),
|
||||
Type = x.Type
|
||||
};
|
||||
|
|
@ -119,7 +118,6 @@ namespace BotSharp.Core.Engines
|
|||
|
||||
return new IntentResponseMessage
|
||||
{
|
||||
Lang = x.Lang,
|
||||
Speech = speech,
|
||||
Type = x.Type
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using BotSharp.Core.Agents;
|
||||
using BotSharp.Core.Engines;
|
||||
using EntityFrameworkCore.BootKit;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
@ -9,6 +11,17 @@ namespace BotSharp.Core.Intents
|
|||
{
|
||||
public static class IntentDriver
|
||||
{
|
||||
public static Intent GetIntent(this IBotEngine bot, Database dc, string intentId)
|
||||
{
|
||||
return dc.Table<Intent>()
|
||||
.Include(x => x.Contexts)
|
||||
.Include(x => x.Responses).ThenInclude(x => x.Contexts)
|
||||
.Include(x => x.Responses).ThenInclude(x => x.Parameters)
|
||||
.Include(x => x.Responses).ThenInclude(x => x.Messages)
|
||||
.Include(x => x.UserSays).ThenInclude(x => x.Data)
|
||||
.FirstOrDefault(x => x.Id == intentId);
|
||||
}
|
||||
|
||||
public static String CreateIntent(this Agent agent, Database dc, Intent intent)
|
||||
{
|
||||
if (dc.Table<Intent>().Any(x => x.Id == intent.Id)) return intent.Id;
|
||||
|
|
|
|||
|
|
@ -19,10 +19,6 @@ namespace BotSharp.Core.Intents
|
|||
|
||||
public AIResponseMessageType Type { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(5)]
|
||||
public String Lang { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// json list data
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue