start working with dialogflow.
This commit is contained in:
parent
fc25c6d634
commit
50b3a3c7ab
|
|
@ -26,22 +26,20 @@ Naive Bayes Classifier</Description>
|
|||
<Configurations>Debug;Release;RASA NLU;DIALOGFLOW;RASA;ARTICULATE</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RASA|AnyCPU'">
|
||||
<DefineConstants>RASA;DEBUG;TRACE</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<OutputPath>bin\RASA</OutputPath>
|
||||
<Optimize>false</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DIALOGFLOW|AnyCPU'">
|
||||
<DefineConstants>DEBUG;TRACE;DIALOGFLOW;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ARTICULATE|AnyCPU'">
|
||||
<DefineConstants>TRACE;ARTICULATE</DefineConstants>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@
|
|||
<ProjectReference Include="..\BotSharp.Core\BotSharp.Core.csproj" />
|
||||
<ProjectReference Include="..\BotSharp.RestApi\BotSharp.RestApi.csproj" />
|
||||
<ProjectReference Include="..\Platform.Articulate\Platform.Articulate.csproj" />
|
||||
<ProjectReference Include="..\Platform.Dialogflow\Platform.Dialogflow.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
84
BotSharp.sln
84
BotSharp.sln
|
|
@ -12,6 +12,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.WebHost", "BotShar
|
|||
{C2FDC855-BD88-4041-B0FF-3AA8A1C11A22} = {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}
|
||||
{75B02A7C-EDB3-4082-9C1F-471773E760C3} = {75B02A7C-EDB3-4082-9C1F-471773E760C3}
|
||||
{184F8B93-68C2-4849-9625-4023C4360990} = {184F8B93-68C2-4849-9625-4023C4360990}
|
||||
{62F08F9F-16C2-4754-90B0-B604DC18AE23} = {62F08F9F-16C2-4754-90B0-B604DC18AE23}
|
||||
{C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72} = {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.NLP", "BotSharp.NLP\BotSharp.NLP.csproj", "{C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}"
|
||||
|
|
@ -32,14 +34,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Platform.Models",
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Platform.Articulate", "Platform.Articulate\Platform.Articulate.csproj", "{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Platform.RasaTalk", "Platform.RasaTalk\Platform.RasaTalk.csproj", "{4D8203E8-0A68-42C9-AA21-9A0514E1008A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Platform.Dialogflow", "Platform.Dialogflow\Platform.Dialogflow.csproj", "{25503190-0B4B-4ECA-8C0C-D12A53A09583}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Platform.RasaUI", "Platform.RasaUI\Platform.RasaUI.csproj", "{FD087443-4A45-4796-893C-6EEB2D5029D5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Platform.Botpress", "Platform.Botpress\Platform.Botpress.csproj", "{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
ARTICULATE|Any CPU = ARTICULATE|Any CPU
|
||||
|
|
@ -274,8 +270,8 @@ Global
|
|||
{C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.ARTICULATE|Any CPU.ActiveCfg = ARTICULATE|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.ARTICULATE|Any CPU.Build.0 = ARTICULATE|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.ARTICULATE|x64.Build.0 = Debug|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -286,36 +282,16 @@ Global
|
|||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.RASA|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.RASA|Any CPU.Build.0 = Release|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.RASA|Any CPU.ActiveCfg = RASA|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.RASA|Any CPU.Build.0 = RASA|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.RASA|x64.ActiveCfg = Release|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.RASA|x64.Build.0 = Release|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.ARTICULATE|x64.Build.0 = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.RASA|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.RASA|Any CPU.Build.0 = Release|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.RASA|x64.ActiveCfg = Release|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.RASA|x64.Build.0 = Release|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4D8203E8-0A68-42C9-AA21-9A0514E1008A}.Release|x64.Build.0 = Release|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.ARTICULATE|Any CPU.ActiveCfg = ARTICULATE|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.ARTICULATE|Any CPU.Build.0 = ARTICULATE|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.ARTICULATE|x64.Build.0 = Debug|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -326,54 +302,14 @@ Global
|
|||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.RASA|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.RASA|Any CPU.Build.0 = Release|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.RASA|Any CPU.ActiveCfg = RASA|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.RASA|Any CPU.Build.0 = RASA|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.RASA|x64.ActiveCfg = Release|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.RASA|x64.Build.0 = Release|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{25503190-0B4B-4ECA-8C0C-D12A53A09583}.Release|x64.Build.0 = Release|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.ARTICULATE|x64.Build.0 = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.RASA|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.RASA|Any CPU.Build.0 = Release|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.RASA|x64.ActiveCfg = Release|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.RASA|x64.Build.0 = Release|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{FD087443-4A45-4796-893C-6EEB2D5029D5}.Release|x64.Build.0 = Release|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.ARTICULATE|x64.Build.0 = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.RASA|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.RASA|Any CPU.Build.0 = Release|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.RASA|x64.ActiveCfg = Release|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.RASA|x64.Build.0 = Release|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{D796FD0C-D161-41D1-8D3C-5B9B39FB3C28}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
|||
|
|
@ -1,11 +1,28 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Configurations>Debug;Release;RASA;ARTICULATE</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DefineConstants>TRACE;DEBUG;RASA</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ARTICULATE|AnyCPU'">
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DefineConstants>TRACE;DEBUG;ARTICULATE</DefineConstants>
|
||||
<OutputPath>bin\DIALOGFLOW</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;DIALOGFLOW</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RASA|AnyCPU'">
|
||||
<Optimize>false</Optimize>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Platform.Dialogflow.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace BotSharp.RestApi.Dialogflow
|
||||
namespace Platform.Dialogflow.Controllers
|
||||
{
|
||||
#if DIALOGFLOW
|
||||
/// <summary>
|
||||
|
|
@ -5,7 +5,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace BotSharp.RestApi.Dialogflow
|
||||
namespace Platform.Dialogflow.Controllers
|
||||
{
|
||||
#if DIALOGFLOW
|
||||
/// <summary>
|
||||
|
|
@ -4,6 +4,7 @@ using BotSharp.NLP;
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Platform.Dialogflow.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
|
@ -11,7 +12,7 @@ using System.Linq;
|
|||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
|
||||
namespace BotSharp.RestApi.Dialogflow
|
||||
namespace Platform.Dialogflow.Controllers
|
||||
{
|
||||
#if DIALOGFLOW
|
||||
/// <summary>
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
using BotSharp.Core.Agents;
|
||||
using BotSharp.Core.Engines;
|
||||
using BotSharp.Core.Engines.Rasa;
|
||||
using BotSharp.Platform.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
|
@ -13,7 +14,7 @@ using System.Text;
|
|||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BotSharp.RestApi.Rasa
|
||||
namespace Platform.Dialogflow.Controllers
|
||||
{
|
||||
#if DIALOGFLOW
|
||||
/// <summary>
|
||||
35
Platform.Dialogflow/DialogflowAi.cs
Normal file
35
Platform.Dialogflow/DialogflowAi.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BotSharp.Core;
|
||||
using BotSharp.Core.Engines;
|
||||
using BotSharp.Platform.Abstraction;
|
||||
using BotSharp.Platform.Models;
|
||||
using BotSharp.Platform.Models.AiRequest;
|
||||
using BotSharp.Platform.Models.AiResponse;
|
||||
using Platform.Dialogflow.Models;
|
||||
|
||||
namespace Platform.Dialogflow
|
||||
{
|
||||
public class DialogflowAi<TAgent> :
|
||||
PlatformBuilderBase<TAgent>,
|
||||
IPlatformBuilder<TAgent>
|
||||
where TAgent : AgentModel
|
||||
{
|
||||
public TrainingCorpus ExtractorCorpus(TAgent agent)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public AiResponse TextRequest(AiRequest request)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<bool> Train(TAgent agent, TrainingCorpus corpus)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Platform.Dialogflow/Models/AgentModel.cs
Normal file
38
Platform.Dialogflow/Models/AgentModel.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using BotSharp.Platform.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Platform.Dialogflow.Models
|
||||
{
|
||||
public class AgentModel : AgentBase
|
||||
{
|
||||
public AgentModel()
|
||||
{
|
||||
Entities = new List<EntityModel>();
|
||||
}
|
||||
|
||||
public string Status { get; set; }
|
||||
|
||||
public string Timezone { get; set; }
|
||||
|
||||
public string AgentName { get; set; }
|
||||
|
||||
public bool UseWebhook { get; set; }
|
||||
|
||||
public bool UsePostFormat { get; set; }
|
||||
|
||||
public bool ExtraTrainingData { get; set; }
|
||||
|
||||
public List<String> FallbackResponses { get; set; }
|
||||
|
||||
public bool EnableModelsPerDomain { get; set; }
|
||||
|
||||
public decimal DomainClassifierThreshold { get; set; }
|
||||
|
||||
public List<EntityModel> Entities { get; set; }
|
||||
|
||||
public DateTime LastTraining { get; set; }
|
||||
}
|
||||
}
|
||||
19
Platform.Dialogflow/Models/EntityModel.cs
Normal file
19
Platform.Dialogflow/Models/EntityModel.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using BotSharp.Platform.Abstraction;
|
||||
using BotSharp.Platform.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Platform.Dialogflow.Models
|
||||
{
|
||||
public class EntityModel : EntityBase
|
||||
{
|
||||
public string Agent { get; set; }
|
||||
|
||||
public string EntityName { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
|
||||
public string UiColor { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,37 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Configurations>Debug;Release;RASA;ARTICULATE</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RASA|AnyCPU'">
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<OutputPath>bin\RASA</OutputPath>
|
||||
<Optimize>false</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DIALOGFLOW|AnyCPU'">
|
||||
<DefineConstants>DEBUG;TRACE;DIALOGFLOW;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ARTICULATE|AnyCPU'">
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DefineConstants>TRACE;DEBUG;DIALOGFLOW</DefineConstants>
|
||||
<OutputPath>bin\DIALOGFLOW</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.1.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BotSharp.Core\BotSharp.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace BotSharp.RestApi.Dialogflow
|
||||
namespace Platform.Dialogflow.ViewModels
|
||||
{
|
||||
public class DialogflowAllEntityViewModel
|
||||
{
|
||||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text;
|
||||
|
||||
namespace BotSharp.RestApi.Dialogflow
|
||||
namespace Platform.Dialogflow.ViewModels
|
||||
{
|
||||
public class QueryModel
|
||||
{
|
||||
|
|
@ -15,6 +15,7 @@ The Open Source AI Bot Platform Builder
|
|||
:target: `botsharpnuget`_
|
||||
:alt: NuGet
|
||||
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<img src="https://raw.githubusercontent.com/Oceania2018/BotSharp/master/BotSharp.WebHost/wwwroot/images/BotSharp.png" width="100px">
|
||||
|
|
|
|||
Loading…
Reference in a new issue