diff --git a/BotSharp.Core/BotSharp.Core.csproj b/BotSharp.Core/BotSharp.Core.csproj
index 2dee05d0..3f86cd92 100644
--- a/BotSharp.Core/BotSharp.Core.csproj
+++ b/BotSharp.Core/BotSharp.Core.csproj
@@ -80,7 +80,7 @@ If you feel that this project is helpful to you, please Star on the project, we
-
+
diff --git a/BotSharp.RestApi/BotSharp.RestApi.csproj b/BotSharp.RestApi/BotSharp.RestApi.csproj
index 326872b8..5dff127a 100644
--- a/BotSharp.RestApi/BotSharp.RestApi.csproj
+++ b/BotSharp.RestApi/BotSharp.RestApi.csproj
@@ -20,7 +20,7 @@
-
+ C:\Users\haipi\Documents\Projects\BotSharp\BotSharp.RestApi\BotSharp.RestApi.xml
TRACE;DEBUG
@@ -85,13 +85,13 @@
-
+
+
-
diff --git a/BotSharp.RestApi/BotSharp.RestApi.xml b/BotSharp.RestApi/BotSharp.RestApi.xml
index 64f1d4d7..ff7cfa9f 100644
--- a/BotSharp.RestApi/BotSharp.RestApi.xml
+++ b/BotSharp.RestApi/BotSharp.RestApi.xml
@@ -4,100 +4,6 @@
BotSharp.RestApi
-
-
- Agent
-
-
-
-
- Initialize dialog controller and get a platform instance
-
-
-
-
-
- Restore a agent from a uploaded zip file
-
-
-
-
-
-
- Dump agent
-
-
-
-
-
-
- The /entities endpoint is used to create, retrieve, update, and delete developer-defined entity objects.
-
-
-
-
- Dialogflow mode query controller
-
-
-
-
- Initialize dialog controller and get a platform instance
-
-
-
-
-
- The query endpoint is used to process natural language in the form of text.
- The query requests return structured data in JSON format with an action and parameters for that action.
- Both GET and POST methods return the same JSON response.
-
-
-
-
-
-
- Array of additional context objects. Should be sent via a POST /query request.
- Contexts sent in a query are activated before the query.
-
-
-
-
- Object containing event name and additional data.
- The "data" parameter can be submitted only in POST requests.
-
-
-
-
- Language tag, e.g., en, es etc.
-
-
-
-
- Natural language text to be processed. Query length should not exceed 256 characters.
-
-
-
-
- A string token up to 36 symbols long, used to identify the client and to manage session parameters (including contexts) per client.
-
-
-
-
- Time zone from IANA Time Zone Database Examples: America/New_York, Europe/Paris
-
-
-
-
- You can post your training data to this endpoint to train a new model for a project.
- This request will wait for the server answer: either the model was trained successfully or the training exited with an error.
-
-
-
-
- Initialize dialog controller and get a platform instance
-
-
-
PAGE_ID
diff --git a/BotSharp.WebHost/BotSharp.WebHost.csproj b/BotSharp.WebHost/BotSharp.WebHost.csproj
index bf91e803..3a76b13b 100644
--- a/BotSharp.WebHost/BotSharp.WebHost.csproj
+++ b/BotSharp.WebHost/BotSharp.WebHost.csproj
@@ -65,13 +65,11 @@
-
-
-
-
+
+
diff --git a/BotSharp.sln b/BotSharp.sln
index 767e8775..bc39fae6 100644
--- a/BotSharp.sln
+++ b/BotSharp.sln
@@ -29,264 +29,104 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Platform.Abstracti
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Platform.Models", "BotSharp.Platform.Models\BotSharp.Platform.Models.csproj", "{C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}"
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.Dialogflow", "Platform.Dialogflow\Platform.Dialogflow.csproj", "{25503190-0B4B-4ECA-8C0C-D12A53A09583}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Platform.Dialogflow", "..\botsharp-dialogflow\BotSharp.Platform.Dialogflow\BotSharp.Platform.Dialogflow.csproj", "{B865F070-9693-47C6-B901-40121F659C6F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- ARTICULATE|Any CPU = ARTICULATE|Any CPU
- ARTICULATE|x64 = ARTICULATE|x64
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
- DIALOGFLOW|Any CPU = DIALOGFLOW|Any CPU
- DIALOGFLOW|x64 = DIALOGFLOW|x64
- RASA|Any CPU = RASA|Any CPU
- RASA|x64 = RASA|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.ARTICULATE|Any CPU.ActiveCfg = ARTICULATE|Any CPU
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.ARTICULATE|Any CPU.Build.0 = ARTICULATE|Any CPU
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.ARTICULATE|x64.ActiveCfg = ARTICULATE|x64
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.ARTICULATE|x64.Build.0 = ARTICULATE|x64
{95780673-2A1A-4953-962F-C46CBFDD07FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95780673-2A1A-4953-962F-C46CBFDD07FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95780673-2A1A-4953-962F-C46CBFDD07FF}.Debug|x64.ActiveCfg = Debug|x64
{95780673-2A1A-4953-962F-C46CBFDD07FF}.Debug|x64.Build.0 = Debug|x64
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.DIALOGFLOW|Any CPU.ActiveCfg = DIALOGFLOW|Any CPU
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.DIALOGFLOW|Any CPU.Build.0 = DIALOGFLOW|Any CPU
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.DIALOGFLOW|x64.ActiveCfg = DIALOGFLOW|x64
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.DIALOGFLOW|x64.Build.0 = DIALOGFLOW|x64
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.RASA|Any CPU.ActiveCfg = RASA|Any CPU
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.RASA|Any CPU.Build.0 = RASA|Any CPU
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.RASA|x64.ActiveCfg = RASA|x64
- {95780673-2A1A-4953-962F-C46CBFDD07FF}.RASA|x64.Build.0 = RASA|x64
{95780673-2A1A-4953-962F-C46CBFDD07FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95780673-2A1A-4953-962F-C46CBFDD07FF}.Release|Any CPU.Build.0 = Release|Any CPU
{95780673-2A1A-4953-962F-C46CBFDD07FF}.Release|x64.ActiveCfg = Release|x64
{95780673-2A1A-4953-962F-C46CBFDD07FF}.Release|x64.Build.0 = Release|x64
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.ARTICULATE|Any CPU.ActiveCfg = ARTICULATE|Any CPU
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.ARTICULATE|Any CPU.Build.0 = ARTICULATE|Any CPU
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.ARTICULATE|x64.ActiveCfg = ARTICULATE|x64
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.ARTICULATE|x64.Build.0 = ARTICULATE|x64
{80DDAA05-69BC-49DD-96A4-37345E7A2E20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80DDAA05-69BC-49DD-96A4-37345E7A2E20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80DDAA05-69BC-49DD-96A4-37345E7A2E20}.Debug|x64.ActiveCfg = Debug|x64
{80DDAA05-69BC-49DD-96A4-37345E7A2E20}.Debug|x64.Build.0 = Debug|x64
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.DIALOGFLOW|Any CPU.ActiveCfg = DIALOGFLOW|Any CPU
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.DIALOGFLOW|Any CPU.Build.0 = DIALOGFLOW|Any CPU
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.DIALOGFLOW|x64.ActiveCfg = DIALOGFLOW|x64
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.DIALOGFLOW|x64.Build.0 = DIALOGFLOW|x64
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.RASA|Any CPU.ActiveCfg = RASA|Any CPU
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.RASA|Any CPU.Build.0 = RASA|Any CPU
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.RASA|x64.ActiveCfg = RASA|x64
- {80DDAA05-69BC-49DD-96A4-37345E7A2E20}.RASA|x64.Build.0 = RASA|x64
{80DDAA05-69BC-49DD-96A4-37345E7A2E20}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80DDAA05-69BC-49DD-96A4-37345E7A2E20}.Release|Any CPU.Build.0 = Release|Any CPU
{80DDAA05-69BC-49DD-96A4-37345E7A2E20}.Release|x64.ActiveCfg = Release|x64
{80DDAA05-69BC-49DD-96A4-37345E7A2E20}.Release|x64.Build.0 = Release|x64
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.ARTICULATE|Any CPU.ActiveCfg = ARTICULATE|Any CPU
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.ARTICULATE|Any CPU.Build.0 = ARTICULATE|Any CPU
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.ARTICULATE|x64.ActiveCfg = ARTICULATE|x64
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.ARTICULATE|x64.Build.0 = ARTICULATE|x64
{03DCA427-327A-4FC9-9A2F-57D17F16708C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03DCA427-327A-4FC9-9A2F-57D17F16708C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03DCA427-327A-4FC9-9A2F-57D17F16708C}.Debug|x64.ActiveCfg = Debug|x64
{03DCA427-327A-4FC9-9A2F-57D17F16708C}.Debug|x64.Build.0 = Debug|x64
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.DIALOGFLOW|Any CPU.ActiveCfg = DIALOGFLOW|Any CPU
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.DIALOGFLOW|Any CPU.Build.0 = DIALOGFLOW|Any CPU
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.DIALOGFLOW|x64.ActiveCfg = DIALOGFLOW|x64
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.DIALOGFLOW|x64.Build.0 = DIALOGFLOW|x64
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.RASA|Any CPU.ActiveCfg = RASA|Any CPU
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.RASA|Any CPU.Build.0 = RASA|Any CPU
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.RASA|x64.ActiveCfg = RASA|x64
- {03DCA427-327A-4FC9-9A2F-57D17F16708C}.RASA|x64.Build.0 = RASA|x64
{03DCA427-327A-4FC9-9A2F-57D17F16708C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03DCA427-327A-4FC9-9A2F-57D17F16708C}.Release|Any CPU.Build.0 = Release|Any CPU
{03DCA427-327A-4FC9-9A2F-57D17F16708C}.Release|x64.ActiveCfg = Release|x64
{03DCA427-327A-4FC9-9A2F-57D17F16708C}.Release|x64.Build.0 = Release|x64
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.ARTICULATE|Any CPU.ActiveCfg = ARTICULATE|Any CPU
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.ARTICULATE|Any CPU.Build.0 = ARTICULATE|Any CPU
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.ARTICULATE|x64.ActiveCfg = ARTICULATE|x64
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.ARTICULATE|x64.Build.0 = ARTICULATE|x64
{C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.Debug|x64.ActiveCfg = Debug|x64
{C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.Debug|x64.Build.0 = Debug|x64
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.DIALOGFLOW|Any CPU.ActiveCfg = DIALOGFLOW|Any CPU
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.DIALOGFLOW|Any CPU.Build.0 = DIALOGFLOW|Any CPU
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.DIALOGFLOW|x64.ActiveCfg = DIALOGFLOW|x64
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.DIALOGFLOW|x64.Build.0 = DIALOGFLOW|x64
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.RASA|Any CPU.ActiveCfg = RASA|Any CPU
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.RASA|Any CPU.Build.0 = RASA|Any CPU
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.RASA|x64.ActiveCfg = RASA|x64
- {C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.RASA|x64.Build.0 = RASA|x64
{C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.Release|Any CPU.Build.0 = Release|Any CPU
{C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.Release|x64.ActiveCfg = Release|x64
{C2FDC855-BD88-4041-B0FF-3AA8A1C11A22}.Release|x64.Build.0 = Release|x64
- {184F8B93-68C2-4849-9625-4023C4360990}.ARTICULATE|Any CPU.ActiveCfg = ARTICULATE|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.ARTICULATE|Any CPU.Build.0 = ARTICULATE|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.ARTICULATE|x64.ActiveCfg = ARTICULATE|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.ARTICULATE|x64.Build.0 = ARTICULATE|Any CPU
{184F8B93-68C2-4849-9625-4023C4360990}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{184F8B93-68C2-4849-9625-4023C4360990}.Debug|Any CPU.Build.0 = Debug|Any CPU
{184F8B93-68C2-4849-9625-4023C4360990}.Debug|x64.ActiveCfg = Debug|Any CPU
{184F8B93-68C2-4849-9625-4023C4360990}.Debug|x64.Build.0 = Debug|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.DIALOGFLOW|Any CPU.ActiveCfg = DIALOGFLOW|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.DIALOGFLOW|Any CPU.Build.0 = DIALOGFLOW|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.DIALOGFLOW|x64.ActiveCfg = DIALOGFLOW|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.DIALOGFLOW|x64.Build.0 = DIALOGFLOW|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.RASA|Any CPU.ActiveCfg = RASA|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.RASA|Any CPU.Build.0 = RASA|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.RASA|x64.ActiveCfg = RASA|Any CPU
- {184F8B93-68C2-4849-9625-4023C4360990}.RASA|x64.Build.0 = RASA|Any CPU
{184F8B93-68C2-4849-9625-4023C4360990}.Release|Any CPU.ActiveCfg = Release|Any CPU
{184F8B93-68C2-4849-9625-4023C4360990}.Release|Any CPU.Build.0 = Release|Any CPU
{184F8B93-68C2-4849-9625-4023C4360990}.Release|x64.ActiveCfg = Release|Any CPU
{184F8B93-68C2-4849-9625-4023C4360990}.Release|x64.Build.0 = Release|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.ARTICULATE|Any CPU.ActiveCfg = ARTICULATE|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.ARTICULATE|Any CPU.Build.0 = ARTICULATE|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.ARTICULATE|x64.ActiveCfg = ARTICULATE|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.ARTICULATE|x64.Build.0 = ARTICULATE|Any CPU
{3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.Debug|x64.ActiveCfg = Debug|Any CPU
{3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.Debug|x64.Build.0 = Debug|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.DIALOGFLOW|Any CPU.ActiveCfg = DIALOGFLOW|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.DIALOGFLOW|Any CPU.Build.0 = DIALOGFLOW|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.RASA|Any CPU.ActiveCfg = RASA|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.RASA|Any CPU.Build.0 = RASA|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.RASA|x64.ActiveCfg = Release|Any CPU
- {3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.RASA|x64.Build.0 = Release|Any CPU
{3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.Release|Any CPU.Build.0 = Release|Any CPU
{3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.Release|x64.ActiveCfg = Release|Any CPU
{3F0CAAD4-564B-43FF-90BF-26AC47C9D677}.Release|x64.Build.0 = Release|Any CPU
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.ARTICULATE|Any CPU.ActiveCfg = ARTICULATE|Any CPU
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.ARTICULATE|Any CPU.Build.0 = ARTICULATE|Any CPU
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.ARTICULATE|x64.ActiveCfg = ARTICULATE|x64
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.ARTICULATE|x64.Build.0 = ARTICULATE|x64
{8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.Debug|x64.ActiveCfg = Debug|x64
{8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.Debug|x64.Build.0 = Debug|x64
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.DIALOGFLOW|Any CPU.ActiveCfg = DIALOGFLOW|Any CPU
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.DIALOGFLOW|Any CPU.Build.0 = DIALOGFLOW|Any CPU
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.DIALOGFLOW|x64.ActiveCfg = DIALOGFLOW|x64
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.DIALOGFLOW|x64.Build.0 = DIALOGFLOW|x64
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.RASA|Any CPU.ActiveCfg = RASA|Any CPU
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.RASA|Any CPU.Build.0 = RASA|Any CPU
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.RASA|x64.ActiveCfg = RASA|x64
- {8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.RASA|x64.Build.0 = RASA|x64
{8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.Release|Any CPU.Build.0 = Release|Any CPU
{8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.Release|x64.ActiveCfg = Release|x64
{8A1F6277-FFCB-4CCD-B798-876D8BE525A9}.Release|x64.Build.0 = Release|x64
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.ARTICULATE|Any CPU.ActiveCfg = ARTICULATE|Any CPU
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.ARTICULATE|Any CPU.Build.0 = ARTICULATE|Any CPU
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.ARTICULATE|x64.ActiveCfg = ARTICULATE|x64
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.ARTICULATE|x64.Build.0 = ARTICULATE|x64
{30F80E7D-951A-4E8F-9C3C-2C866528EABD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{30F80E7D-951A-4E8F-9C3C-2C866528EABD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{30F80E7D-951A-4E8F-9C3C-2C866528EABD}.Debug|x64.ActiveCfg = Debug|x64
{30F80E7D-951A-4E8F-9C3C-2C866528EABD}.Debug|x64.Build.0 = Debug|x64
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.DIALOGFLOW|Any CPU.ActiveCfg = DIALOGFLOW|Any CPU
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.DIALOGFLOW|Any CPU.Build.0 = DIALOGFLOW|Any CPU
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.DIALOGFLOW|x64.ActiveCfg = DIALOGFLOW|x64
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.DIALOGFLOW|x64.Build.0 = DIALOGFLOW|x64
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.RASA|Any CPU.ActiveCfg = RASA|Any CPU
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.RASA|Any CPU.Build.0 = RASA|Any CPU
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.RASA|x64.ActiveCfg = RASA|x64
- {30F80E7D-951A-4E8F-9C3C-2C866528EABD}.RASA|x64.Build.0 = RASA|x64
{30F80E7D-951A-4E8F-9C3C-2C866528EABD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{30F80E7D-951A-4E8F-9C3C-2C866528EABD}.Release|Any CPU.Build.0 = Release|Any CPU
{30F80E7D-951A-4E8F-9C3C-2C866528EABD}.Release|x64.ActiveCfg = Release|x64
{30F80E7D-951A-4E8F-9C3C-2C866528EABD}.Release|x64.Build.0 = Release|x64
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.ARTICULATE|x64.Build.0 = Debug|Any CPU
{62F08F9F-16C2-4754-90B0-B604DC18AE23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62F08F9F-16C2-4754-90B0-B604DC18AE23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62F08F9F-16C2-4754-90B0-B604DC18AE23}.Debug|x64.ActiveCfg = Debug|Any CPU
{62F08F9F-16C2-4754-90B0-B604DC18AE23}.Debug|x64.Build.0 = Debug|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.RASA|Any CPU.ActiveCfg = Release|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.RASA|Any CPU.Build.0 = Release|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.RASA|x64.ActiveCfg = Release|Any CPU
- {62F08F9F-16C2-4754-90B0-B604DC18AE23}.RASA|x64.Build.0 = Release|Any CPU
{62F08F9F-16C2-4754-90B0-B604DC18AE23}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62F08F9F-16C2-4754-90B0-B604DC18AE23}.Release|Any CPU.Build.0 = Release|Any CPU
{62F08F9F-16C2-4754-90B0-B604DC18AE23}.Release|x64.ActiveCfg = Release|Any CPU
{62F08F9F-16C2-4754-90B0-B604DC18AE23}.Release|x64.Build.0 = Release|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.ARTICULATE|Any CPU.ActiveCfg = Debug|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.ARTICULATE|Any CPU.Build.0 = Debug|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.ARTICULATE|x64.ActiveCfg = Debug|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.ARTICULATE|x64.Build.0 = Debug|Any CPU
{C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.Debug|x64.ActiveCfg = Debug|Any CPU
{C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.Debug|x64.Build.0 = Debug|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.DIALOGFLOW|Any CPU.Build.0 = Debug|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.DIALOGFLOW|x64.ActiveCfg = Debug|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.DIALOGFLOW|x64.Build.0 = Debug|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.RASA|Any CPU.ActiveCfg = Release|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.RASA|Any CPU.Build.0 = Release|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.RASA|x64.ActiveCfg = Release|Any CPU
- {C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.RASA|x64.Build.0 = Release|Any CPU
{C4F2EAE5-F2C7-4F52-9DB2-7E76D7080C72}.Release|Any CPU.ActiveCfg = Release|Any CPU
{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 = 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
- {2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.Debug|x64.ActiveCfg = Debug|Any CPU
- {2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.Debug|x64.Build.0 = Debug|Any CPU
- {2B279A6C-C829-4D29-9C1C-809C8A8E36B2}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU
- {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 = 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
- {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
- {25503190-0B4B-4ECA-8C0C-D12A53A09583}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {25503190-0B4B-4ECA-8C0C-D12A53A09583}.Debug|x64.ActiveCfg = Debug|Any CPU
- {25503190-0B4B-4ECA-8C0C-D12A53A09583}.Debug|x64.Build.0 = Debug|Any CPU
- {25503190-0B4B-4ECA-8C0C-D12A53A09583}.DIALOGFLOW|Any CPU.ActiveCfg = Debug|Any CPU
- {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 = 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
+ {B865F070-9693-47C6-B901-40121F659C6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B865F070-9693-47C6-B901-40121F659C6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B865F070-9693-47C6-B901-40121F659C6F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B865F070-9693-47C6-B901-40121F659C6F}.Debug|x64.Build.0 = Debug|Any CPU
+ {B865F070-9693-47C6-B901-40121F659C6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B865F070-9693-47C6-B901-40121F659C6F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B865F070-9693-47C6-B901-40121F659C6F}.Release|x64.ActiveCfg = Release|Any CPU
+ {B865F070-9693-47C6-B901-40121F659C6F}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Platform.Dialogflow/AgentImporterInDialogflow.cs b/Platform.Dialogflow/AgentImporterInDialogflow.cs
deleted file mode 100644
index b29673eb..00000000
--- a/Platform.Dialogflow/AgentImporterInDialogflow.cs
+++ /dev/null
@@ -1,293 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using BotSharp.Platform.Abstraction;
-using BotSharp.Platform.Models;
-using BotSharp.Platform.Models.AiResponse;
-using BotSharp.Platform.Models.Intents;
-using BotSharp.Platform.Models.MachineLearning;
-using DotNetToolkit;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using Platform.Dialogflow.Models;
-
-namespace Platform.Dialogflow
-{
- ///
- /// Import agent from Dialogflow
- ///
- public class AgentImporterInDialogflow : IAgentImporter where TAgent : AgentModel
- {
- public string AgentDir { get; set; }
-
- ///
- /// Load agent meta
- ///
- ///
- ///
- ///
- public TAgent LoadAgent(AgentImportHeader agentHeader)
- {
- // load agent profile
- string data = File.ReadAllText(Path.Combine(AgentDir, "agent.json"));
- var agent = JsonConvert.DeserializeObject(data);
- agent.Name = agentHeader.Name;
- agent.Id = agentHeader.Id;
-
- var result = agent.ToObject();
- result.ClientAccessToken = agentHeader.ClientAccessToken;
- result.DeveloperAccessToken = agentHeader.DeveloperAccessToken;
-
- result.MlConfig = agent.ToObject();
- result.MlConfig.MinConfidence = agent.MlMinConfidence;
- result.MlConfig.AgentId = agent.Id;
- if(agentHeader.Integrations != null)
- {
- agentHeader.Integrations.ForEach(x => x.AgentId = agent.Id);
- result.Integrations = agentHeader.Integrations;
- }
-
- return result;
- }
-
- public void LoadCustomEntities(TAgent agent)
- {
- agent.Entities = new List();
- string entityDir = Path.Combine(AgentDir, "entities");
- if (!Directory.Exists(entityDir)) return;
-
- Directory.EnumerateFiles(entityDir)
- .ToList()
- .ForEach(fileName =>
- {
- string entityName = fileName.Split(Path.DirectorySeparatorChar).Last();
- if (!entityName.Contains("_"))
- {
- string entityJson = File.ReadAllText($"{fileName}");
- var entity = JsonConvert.DeserializeObject(entityJson);
-
- // load entries
- string entriesFileName = fileName.Replace(entity.Name, $"{entity.Name}_entries_{agent.Language}");
- if (File.Exists(entriesFileName))
- {
- string entriesJson = File.ReadAllText($"{entriesFileName}");
- entriesJson = entriesJson.Replace("\"synonyms\":", "\"rawSynonyms\":");
- entity.Entries = JsonConvert.DeserializeObject>(entriesJson);
- entity.Entries.ForEach(x => x.Synonyms = x.RawSynonyms.Select(s => new EntrySynonym
- {
- Synonym = s
- }).ToList());
- }
-
- var entityType = entity.ToObject();
- agent.Entities.Add(entityType);
- }
- });
- }
-
- public void LoadIntents(TAgent agent)
- {
- agent.Intents = new List();
- string intentDir = Path.Combine(AgentDir, "intents");
- if (!Directory.Exists(intentDir)) return;
-
- Directory.EnumerateFiles(intentDir)
- .ToList()
- .ForEach(fileName =>
- {
- if (!fileName.Contains("_usersays_" + agent.Language)
- || fileName.Contains("Default Fallback Intent"))
- {
- string intentJson = File.ReadAllText($"{fileName}");
-
- // avoid confict data structure
- intentJson = intentJson.Replace("\"contexts\":", "\"contextList\":");
- intentJson = intentJson.Replace("\"messages\":", "\"messageList\":");
- intentJson = intentJson.Replace("\"prompts\":", "\"promptList\":");
-
- var intent = JsonConvert.DeserializeObject(intentJson);
- var newIntent = ImportIntentUserSays(agent, intent, fileName);
- agent.Intents.Add(newIntent);
- }
- });
- }
-
- private Intent ImportIntentUserSays(TAgent agent, DialogflowIntent intent, string fileName)
- {
- // void id confict
- intent.Id = Guid.NewGuid().ToString();
- intent.Name = intent.Name.Replace("/", "_");
- // load user expressions
- if (fileName.Contains("Default Fallback Intent"))
- {
- intent.UserSays = (intent.Responses[0].MessageList[0].Speech as JArray)
- .Select(x => new DialogflowIntentExpression
- {
- Data = new List
- {
- new DialogflowIntentExpressionPart
- {
- Text = x.ToString()
- }
- }
- }).ToList();
- }
- else
- {
- string expressionFileName = fileName.Replace(intent.Name, $"{intent.Name}_usersays_{agent.Language}");
- if (File.Exists(expressionFileName))
- {
- string expressionJson = File.ReadAllText($"{expressionFileName}");
- intent.UserSays = JsonConvert.DeserializeObject>(expressionJson);
-
- intent.UserSays.ForEach(say =>
- {
- // remove @sys.ignore
- say.Data.Where(x => x.Meta == "@sys.ignore").ToList().ForEach(x => x.Meta = null);
-
- // remove @sys.
- say.Data.Where(x => x.Meta != null && x.Meta.StartsWith("@sys.")).ToList().ForEach(x => x.Meta = x.Meta.Substring(5));
-
- // remove @
- say.Data.Where(x => x.Meta != null && x.Meta.StartsWith("@")).ToList().ForEach(x => x.Meta = x.Meta.Substring(1));
-
- // calculate offset
- for(int i = 1; i < say.Data.Count; i++)
- {
- say.Data[i].Start = String.Join("", say.Data.Select(x => x.Text).Take(i)).Length;
- }
- });
- }
- }
-
- var newIntent = ImportIntentResponse(agent, intent);
-
- newIntent.Contexts = intent.ContextList.Select(x => new IntentInputContext { Name = x }).ToList();
-
- return newIntent;
- }
-
- private Intent ImportIntentResponse(TAgent agent, DialogflowIntent intent)
- {
- var newIntent = intent.ToObject();
-
- intent.Responses.ForEach(res =>
- {
- var newResponse = newIntent.Responses.First(x => x.Id == res.Id);
-
- newResponse.Contexts = res.AffectedContexts.Select(x => new IntentResponseContext
- {
- Name = x.Name,
- Lifespan = x.Lifespan
- }).ToList();
-
- int millSeconds = 0;
-
- newResponse.Messages = res.MessageList.Where(x => x.Speech != null || x.Payload != null)
- .Select(x =>
- {
- if (x.Type == AIResponseMessageType.Custom)
- {
- return new IntentResponseMessage
- {
- Payload = JObject.FromObject(x.Payload),
- PayloadJson = JsonConvert.SerializeObject(x.Payload),
- Type = x.Type,
- UpdatedTime = DateTime.UtcNow.AddMilliseconds(millSeconds++)
- };
- }
- else
- {
- var speech = JsonConvert.SerializeObject(x.Speech.GetType().Equals(typeof(String)) ?
- new List { x.Speech.ToString() } :
- (x.Speech as JArray).Select(s => s.Value()).ToList());
-
- return new IntentResponseMessage
- {
- Speech = speech,
- Type = x.Type,
- UpdatedTime = DateTime.UtcNow.AddMilliseconds(millSeconds++)
- };
- }
-
- }).ToList();
-
- newResponse.Parameters = res.Parameters.Select(p =>
- {
- var rp = p.ToObject();
-
- // remove @sys.
- if (rp.DataType.StartsWith("@sys."))
- {
- rp.DataType = rp.DataType.Substring(5);
- }
-
- if (rp.DataType.StartsWith("@"))
- {
- rp.DataType = rp.DataType.Substring(1);
- }
-
- rp.Prompts = p.PromptList.Select(pl => new ResponseParameterPrompt { Prompt = pl.Value }).ToList();
- return rp;
- }).ToList();
- });
-
- return newIntent;
- }
-
- public void LoadBuildinEntities(TAgent agent)
- {
- agent.Intents.ForEach(intent =>
- {
- if (intent.UserSays != null)
- {
- intent.UserSays.ForEach(us =>
- {
- us.Data.Where(data => data.Meta != null)
- .ToList()
- .ForEach(data =>
- {
- LoadBuildinEntityTypePerUserSay(agent, data);
- });
- });
- }
-
- });
- }
-
- private void LoadBuildinEntityTypePerUserSay(TAgent agent, IntentExpressionPart data)
- {
- var existedEntityType = agent.Entities.FirstOrDefault(x => x.Name == data.Meta);
-
- if (existedEntityType == null)
- {
- existedEntityType = new EntityType
- {
- Name = data.Meta,
- Entries = new List(),
- IsOverridable = true
- };
-
- agent.Entities.Add(existedEntityType);
- }
-
- var entries = existedEntityType.Entries.Select(x => x.Value.ToLower()).ToList();
- if (!entries.Contains(data.Text.ToLower()))
- {
- existedEntityType.Entries.Add(new EntityEntry
- {
- Value = data.Text,
- Synonyms = new List
- {
- new EntrySynonym
- {
- Synonym = data.Text
- }
- }
- });
- }
- }
- }
-}
diff --git a/Platform.Dialogflow/Controllers/AgentController.cs b/Platform.Dialogflow/Controllers/AgentController.cs
deleted file mode 100644
index 38a64fa9..00000000
--- a/Platform.Dialogflow/Controllers/AgentController.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using BotSharp.Core.Engines;
-using DotNetToolkit;
-using EntityFrameworkCore.BootKit;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Configuration;
-using Newtonsoft.Json;
-using Platform.Dialogflow.Models;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.IO.Compression;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Platform.Dialogflow.Controllers
-{
-#if DIALOGFLOW
- ///
- /// Agent
- ///
- [Route("v1/[controller]")]
- public class AgentController : ControllerBase
- {
- private DialogflowAi builder;
-
- ///
- /// Initialize dialog controller and get a platform instance
- ///
- ///
- public AgentController(IConfiguration configuration)
- {
- builder = new DialogflowAi();
- builder.PlatformConfig = configuration.GetSection("DialogflowAi");
- }
-
- ///
- /// Import a agent from a uploaded zip file
- ///
- ///
- ///
- [HttpPost("import")]
- public async Task Import(IFormFile uploadedFile)
- {
- if (uploadedFile == null || uploadedFile.Length == 0)
- {
- return BadRequest();
- }
-
- var filePath = Path.GetTempFileName();
- Console.WriteLine($"Temp file saved to {filePath}");
-
- using (var stream = new FileStream(filePath, FileMode.Create))
- {
- await uploadedFile.CopyToAsync(stream);
- }
-
- string dest = Path.Combine(AppDomain.CurrentDomain.GetData("DataPath").ToString(), "Projects", uploadedFile.FileName.Split('.').First(), "tmp");
- if (Directory.Exists(dest))
- {
- System.IO.Directory.Delete(dest, true);
- }
-
- Console.WriteLine($"Extract zip file to {dest}");
- ZipFile.ExtractToDirectory(filePath, dest);
-
- System.IO.File.Delete(filePath);
-
- Console.WriteLine($"Loading agent from folder {dest}");
- var agent = builder.LoadAgentFromFile>(dest);
- builder.SaveAgent(agent);
-
- return Ok(agent.Id);
- }
-
- ///
- /// Dump agent
- ///
- ///
- ///
- [HttpGet("{agentId}")]
- public ActionResult Dump([FromRoute] String agentId)
- {
- return Ok();
- }
- }
-#endif
-}
diff --git a/Platform.Dialogflow/Controllers/EntitiesController.cs b/Platform.Dialogflow/Controllers/EntitiesController.cs
deleted file mode 100644
index 206e49fe..00000000
--- a/Platform.Dialogflow/Controllers/EntitiesController.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using Platform.Dialogflow.ViewModels;
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Platform.Dialogflow.Controllers
-{
-#if DIALOGFLOW
- ///
- /// The /entities endpoint is used to create, retrieve, update, and delete developer-defined entity objects.
- ///
- [Authorize]
- [Route("v1/[controller]")]
- public class EntitiesController : ControllerBase
- {
- [HttpGet]
- public IEnumerable All()
- {
- return new List();
- }
- }
-#endif
-}
diff --git a/Platform.Dialogflow/Controllers/IntentsController.cs b/Platform.Dialogflow/Controllers/IntentsController.cs
deleted file mode 100644
index 68c4fa35..00000000
--- a/Platform.Dialogflow/Controllers/IntentsController.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using Platform.Dialogflow.Models;
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Platform.Dialogflow.Controllers
-{
-#if DIALOGFLOW
- ///
- /// The /intents endpoint is used to create, retrieve, update, and delete intent objects.
- ///
- [Authorize]
- [Route("v1/[controller]")]
- public class IntentsController : ControllerBase
- {
- ///
- /// Retrieves a list of all intents for the agent.
- ///
- ///
- [HttpGet]
- public IEnumerable GetIntents()
- {
- return new List();
- }
-
- ///
- /// The POST request creates a new intent. When a new intent is created via the API, the agent is trained with the new data.
- ///
- ///
- [HttpPost]
- public string PostIntent([FromBody] DialogflowIntent intent)
- {
- return "";
- }
-
- ///
- /// Retrieves the specified intent. {id} is the ID of the intent to retrieve.
- ///
- ///
- [HttpGet("{id}")]
- public DialogflowIntent GetIntent()
- {
- return new DialogflowIntent();
- }
-
- [HttpPut("{id}")]
- public bool PutIntent([FromBody] DialogflowIntent intent)
- {
- return true;
- }
- }
-#endif
-}
diff --git a/Platform.Dialogflow/Controllers/QueryController.cs b/Platform.Dialogflow/Controllers/QueryController.cs
deleted file mode 100644
index 4fb7bafc..00000000
--- a/Platform.Dialogflow/Controllers/QueryController.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-using BotSharp.Core.Engines;
-using BotSharp.NLP;
-using BotSharp.Platform.Models;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using Newtonsoft.Json;
-using Platform.Dialogflow.Models;
-using Platform.Dialogflow.ViewModels;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Security.Claims;
-using System.Text;
-
-namespace Platform.Dialogflow.Controllers
-{
-#if DIALOGFLOW
- ///
- /// Dialogflow mode query controller
- ///
- [Authorize]
- [Route("v1/[controller]")]
- public class QueryController : ControllerBase
- {
- private readonly IBotPlatform _platform;
-
- ///
- /// Initialize dialog controller and get a platform instance
- ///
- ///
- public QueryController(IBotPlatform platform)
- {
- _platform = platform;
- }
-
- ///
- /// The query endpoint is used to process natural language in the form of text.
- /// The query requests return structured data in JSON format with an action and parameters for that action.
- /// Both GET and POST methods return the same JSON response.
- ///
- ///
- ///
- [HttpGet, HttpPost]
- public ActionResult Query(QueryModel request)
- {
- String clientAccessToken = (User.Identity as ClaimsIdentity).Claims.FirstOrDefault(x => x.Type == "UserId")?.Value;
- //_platform.AiConfig = new AIConfiguration(clientAccessToken, SupportedLanguage.English);
- //_platform.AiConfig.SessionId = request.SessionId;
-
- // find a model according to clientAccessToken
- string projectPath = String.Empty;
- string projectsPath = Path.Combine(AppDomain.CurrentDomain.GetData("DataPath").ToString(), "Projects");
-
- string[] d1 = Directory.GetDirectories(projectsPath);
- for (int i = 0; i < d1.Length; i++)
- {
- string[] d2 = Directory.GetDirectories(d1[i]);
- for (int j = 0; j < d2.Length; j++)
- {
- string metaJson = System.IO.File.ReadAllText(Path.Combine(d2[j], "meta.json"));
-
- var meta = JsonConvert.DeserializeObject(metaJson);
-
- if (meta.ClientAccessToken == clientAccessToken)
- {
- projectPath = d1[i];
- break;
- }
- };
-
- if (!String.IsNullOrEmpty(projectPath))
- {
- break;
- }
- };
-
- // Load agent
- string model = Directory.GetDirectories(projectPath).Where(x => x.Contains("model_")).Last().Split(Path.DirectorySeparatorChar).Last();
- string dataDir = Path.Combine(projectPath, model);
-
- if(!System.IO.File.Exists(Path.Combine(dataDir, "model-meta.json")))
- {
- return BadRequest("The agent hasn't been trained. Please train the agent before querying.");
- }
-
- Console.WriteLine($"LoadAgentFromFile {dataDir}");
-
- //_platform.LoadAgentFromFile(dataDir);
-
- /*var aIResponse = _platform.TextRequest(new AIRequest
- {
- Timezone = request.Timezone,
- Contexts = request?.Contexts?.Select(x => new AIContext { Name = x })?.ToList(),
- Language = request.Lang,
- Query = new String[] { request.Query },
- AgentDir = projectPath,
- Model = model
- });*/
-
- return null;
- }
- }
-#endif
-}
diff --git a/Platform.Dialogflow/Controllers/TrainController.cs b/Platform.Dialogflow/Controllers/TrainController.cs
deleted file mode 100644
index 0978a705..00000000
--- a/Platform.Dialogflow/Controllers/TrainController.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using BotSharp.Core.Engines;
-using BotSharp.Platform.Models;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.Extensions.Configuration;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using Newtonsoft.Json.Serialization;
-using Platform.Dialogflow.Models;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
-
-namespace Platform.Dialogflow.Controllers
-{
-#if DIALOGFLOW
- ///
- /// You can post your training data to this endpoint to train a new model for a project.
- /// This request will wait for the server answer: either the model was trained successfully or the training exited with an error.
- ///
- [Route("v1/[controller]")]
- public class TrainController : ControllerBase
- {
- private DialogflowAi builder;
-
- public TrainController(IConfiguration configuration)
- {
- builder = new DialogflowAi();
- builder.PlatformConfig = configuration.GetSection("DialogflowAi");
- }
-
- [HttpPost]
- public async Task> Train([FromQuery] string agentId)
- {
- var agent = builder.GetAgentById(agentId);
-
- if(agent == null)
- {
- agent = builder.GetAgentByName(agentId);
- }
-
- var corpus = builder.ExtractorCorpus(agent);
-
- await builder.Train(agent, corpus);
-
- return agent;
- }
- }
-#endif
-}
diff --git a/Platform.Dialogflow/DialogflowAi.cs b/Platform.Dialogflow/DialogflowAi.cs
deleted file mode 100644
index 3a81d890..00000000
--- a/Platform.Dialogflow/DialogflowAi.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using BotSharp.Core;
-using BotSharp.Core.Engines;
-using BotSharp.NLP;
-using BotSharp.Platform.Abstraction;
-using BotSharp.Platform.Models;
-using BotSharp.Platform.Models.AiRequest;
-using BotSharp.Platform.Models.AiResponse;
-using DotNetToolkit;
-using Platform.Dialogflow.Models;
-
-namespace Platform.Dialogflow
-{
- public class DialogflowAi :
- PlatformBuilderBase,
- IPlatformBuilder
- where TAgent : AgentModel
- {
- public TrainingCorpus ExtractorCorpus(TAgent agent)
- {
- var corpus = new TrainingCorpus
- {
- Entities = new List(),
- UserSays = new List>()
- };
-
- agent.Entities.ForEach(entity =>
- {
- corpus.Entities.Add(new TrainingEntity
- {
- Entity = entity.Name,
- Values = entity.Entries.Select(x => new TrainingEntitySynonym
- {
- Value = x.Value,
- Synonyms = x.Synonyms.Select(y => y.Synonym).ToList()
- }).ToList()
- });
- });
-
- agent.Intents.ForEach(intent =>
- {
- intent.UserSays.ForEach(say => {
- corpus.UserSays.Add(new TrainingIntentExpression
- {
- Intent = intent.Name,
- Text = String.Join("", say.Data.Select(x => x.Text)),
- Entities = say.Data.Where(x => !String.IsNullOrEmpty(x.Meta))
- .Select(x => new TrainingIntentExpressionPart
- {
- Value = x.Text,
- Entity = x.Meta,
- Start = x.Start
- })
- .ToList()
- });
- });
- });
-
- return corpus;
- }
-
- public AiResponse TextRequest(AiRequest request)
- {
- var dataService = new AIDataService(new AIConfiguration("TOKEN", SupportedLanguage.English)
- {
- AgentId = request.AgentId,
- Language = SupportedLanguage.English,
- SessionId = request.SessionId
- });
-
- var response = dataService.Request(new AIRequest
- {
- SessionId = request.SessionId,
- Query = new string[] { request.Text }
- });
-
- return response.ToObject();
- }
-
- public async Task Train(TAgent agent, TrainingCorpus corpus)
- {
- var trainer = new BotTrainer();
-
- var trainOptions = new BotTrainOptions
- {
- //AgentDir = projectPath,
- //Model = model
- };
-
- var info = await trainer.Train(agent, trainOptions);
-
- return true;
- }
-
- protected float[] TrimSilence(float[] samples)
- {
- if (samples == null)
- {
- return null;
- }
-
- const float min = 0.000001f;
-
- var startIndex = 0;
- var endIndex = samples.Length;
-
- for (var i = 0; i < samples.Length; i++)
- {
-
- if (Math.Abs(samples[i]) > min)
- {
- startIndex = i;
- break;
- }
- }
-
- for (var i = samples.Length - 1; i > 0; i--)
- {
- if (Math.Abs(samples[i]) > min)
- {
- endIndex = i;
- break;
- }
- }
-
- if (endIndex <= startIndex)
- {
- return null;
- }
-
- var result = new float[endIndex - startIndex];
- Array.Copy(samples, startIndex, result, 0, endIndex - startIndex);
- return result;
-
- }
-
- protected static byte[] ConvertArrayShortToBytes(short[] array)
- {
- var numArray = new byte[array.Length * 2];
- Buffer.BlockCopy(array, 0, numArray, 0, numArray.Length);
- return numArray;
- }
-
- protected static short[] ConvertIeeeToPcm16(float[] source)
- {
- var resultBuffer = new short[source.Length];
- for (var i = 0; i < source.Length; i++)
- {
- var f = source[i] * 32768f;
-
- if (f > (double)short.MaxValue)
- f = short.MaxValue;
- else if (f < (double)short.MinValue)
- f = short.MinValue;
- resultBuffer[i] = Convert.ToInt16(f);
- }
-
- return resultBuffer;
- }
- }
-}
diff --git a/Platform.Dialogflow/Models/AIConfiguration.cs b/Platform.Dialogflow/Models/AIConfiguration.cs
deleted file mode 100644
index dc0d0656..00000000
--- a/Platform.Dialogflow/Models/AIConfiguration.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using BotSharp.NLP;
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Platform.Dialogflow.Models
-{
- public class AIConfiguration
- {
- private const string SERVICE_PROD_URL = "https://api.api.ai/v1/";
- private const string SERVICE_DEV_URL = "https://dev.api.ai/api/";
-
- private const string CURRENT_PROTOCOL_VERSION = "20150910";
-
- public string ClientAccessToken { get; private set; }
-
- public string AgentId { get; set; }
-
- public SupportedLanguage Language { get; set; }
-
- public bool VoiceActivityDetectionEnabled { get; set; }
-
- public string SessionId { get; set; }
-
- ///
- /// If true, will be used Testing API.AI server instead of Production server. This option for TESTING PURPOSES ONLY.
- ///
- public bool DevMode { get; set; }
-
- ///
- /// If true, all request and response content will be printed to the console. Use this option only FOR DEVELOPMENT.
- ///
- public bool DebugLog { get; set; }
-
- string protocolVersion;
- public string ProtocolVersion
- {
- get
- {
- return protocolVersion;
- }
- set
- {
- if (string.IsNullOrEmpty(value))
- {
- throw new ArgumentNullException("value");
- }
- protocolVersion = value;
- }
- }
-
- public AIConfiguration(string clientAccessToken, SupportedLanguage language)
- {
- this.ClientAccessToken = clientAccessToken;
- this.Language = language;
-
- DevMode = false;
- DebugLog = false;
- VoiceActivityDetectionEnabled = true;
-
- ProtocolVersion = CURRENT_PROTOCOL_VERSION;
- }
-
- public string RequestUrl
- {
- get
- {
- var baseUrl = DevMode ? SERVICE_DEV_URL : SERVICE_PROD_URL;
- return string.Format("{0}{1}?v={2}", baseUrl, "query", ProtocolVersion);
- }
- }
- }
-}
diff --git a/Platform.Dialogflow/Models/AIContext.cs b/Platform.Dialogflow/Models/AIContext.cs
deleted file mode 100644
index a42c7bff..00000000
--- a/Platform.Dialogflow/Models/AIContext.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Platform.Dialogflow.Models
-{
- [JsonObject]
- public class AIContext
- {
- [JsonProperty("name")]
- public string Name { get; set; }
-
- [JsonProperty("parameters")]
- public Dictionary Parameters { get; set; }
-
- ///
- /// Lifespan of the context measured in requests````
- ///
- [JsonProperty("lifespan")]
- public int Lifespan { get; set; }
-
- public AIContext()
- {
- }
- }
-}
diff --git a/Platform.Dialogflow/Models/AIDataService.cs b/Platform.Dialogflow/Models/AIDataService.cs
deleted file mode 100644
index 1b26895d..00000000
--- a/Platform.Dialogflow/Models/AIDataService.cs
+++ /dev/null
@@ -1,180 +0,0 @@
-using BotSharp.Core.Engines.Dialogflow;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Serialization;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Net;
-using System.Text;
-
-namespace Platform.Dialogflow.Models
-{
- public class AIDataService
- {
- private readonly AIConfiguration config;
-
- public string SessionId { get; }
-
- public AIDataService(AIConfiguration config)
- {
- this.config = config;
-
- if (string.IsNullOrEmpty(config.SessionId))
- {
- SessionId = Guid.NewGuid().ToString();
- }
- else
- {
- SessionId = config.SessionId;
- }
- }
-
- public AIResponse Request(AIRequest request)
- {
- request.Language = config.Language.code;
- request.Timezone = TimeZone.CurrentTimeZone.StandardName;
- request.SessionId = SessionId;
-
- try
- {
- var httpRequest = (HttpWebRequest)WebRequest.Create(config.RequestUrl);
- httpRequest.Method = "POST";
- httpRequest.ContentType = "application/json; charset=utf-8";
- httpRequest.Accept = "application/json";
-
- httpRequest.Headers.Add("Authorization", "Bearer " + config.ClientAccessToken);
-
- var jsonSettings = new JsonSerializerSettings
- {
- NullValueHandling = NullValueHandling.Ignore,
- ContractResolver = new CamelCasePropertyNamesContractResolver()
- };
-
- var jsonRequest = JsonConvert.SerializeObject(request, Formatting.None, jsonSettings);
-
- if (config.DebugLog)
- {
- Debug.WriteLine("Request: " + jsonRequest);
- }
-
- using (var streamWriter = new StreamWriter(httpRequest.GetRequestStream()))
- {
- streamWriter.Write(jsonRequest);
- streamWriter.Close();
- }
-
- var httpResponse = httpRequest.GetResponse() as HttpWebResponse;
- using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
- {
- var result = streamReader.ReadToEnd();
-
- if (config.DebugLog)
- {
- Debug.WriteLine("Response: " + result);
- }
-
- var aiResponse = JsonConvert.DeserializeObject(result);
-
- CheckForErrors(aiResponse);
-
- return aiResponse;
- }
-
- }
- catch (Exception e)
- {
- throw new AIServiceException(e);
- }
- }
-
- public AIResponse VoiceRequest(Stream voiceStream, RequestExtras requestExtras = null)
- {
- var request = new AIRequest();
- request.Language = config.Language.code;
- request.Timezone = TimeZone.CurrentTimeZone.StandardName;
- request.SessionId = SessionId;
-
- if (requestExtras != null)
- {
- requestExtras.CopyTo(request);
- }
-
- try
- {
- var httpRequest = (HttpWebRequest)WebRequest.Create(config.RequestUrl);
- httpRequest.Method = "POST";
- httpRequest.Accept = "application/json";
-
- httpRequest.Headers.Add("Authorization", "Bearer " + config.ClientAccessToken);
-
- var jsonSettings = new JsonSerializerSettings
- {
- NullValueHandling = NullValueHandling.Ignore
- };
-
- var jsonRequest = JsonConvert.SerializeObject(request, Formatting.None, jsonSettings);
-
- if (config.DebugLog)
- {
- Debug.WriteLine("Request: " + jsonRequest);
- }
-
- var multipartClient = new MultipartHttpClient(httpRequest);
- multipartClient.connect();
-
- multipartClient.addStringPart("request", jsonRequest);
- multipartClient.addFilePart("voiceData", "voice.wav", voiceStream);
-
- multipartClient.finish();
-
- var responseJsonString = multipartClient.getResponse();
-
- if (config.DebugLog)
- {
- Debug.WriteLine("Response: " + responseJsonString);
- }
-
- var aiResponse = JsonConvert.DeserializeObject(responseJsonString);
-
- CheckForErrors(aiResponse);
-
- return aiResponse;
-
- }
- catch (Exception e)
- {
- throw new AIServiceException(e);
- }
- }
-
- public bool ResetContexts()
- {
- var cleanRequest = new AIRequest("empty_query_for_resetting_contexts");
- cleanRequest.ResetContexts = true;
- try
- {
- var response = Request(cleanRequest);
- return !response.IsError;
- }
- catch (AIServiceException e)
- {
- Debug.WriteLine("Exception while contexts clean." + e);
- return false;
- }
- }
-
- static void CheckForErrors(AIResponse aiResponse)
- {
- if (aiResponse == null)
- {
- throw new AIServiceException("API.AI response parsed as null. Check debug log for details.");
- }
-
- if (aiResponse.IsError)
- {
- throw new AIServiceException(aiResponse);
- }
- }
- }
-}
diff --git a/Platform.Dialogflow/Models/AIRequest.cs b/Platform.Dialogflow/Models/AIRequest.cs
deleted file mode 100644
index 29171e5a..00000000
--- a/Platform.Dialogflow/Models/AIRequest.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Platform.Dialogflow.Models
-{
- public class AIRequest : QuestionMetadata
- {
- public string[] Query { get; set; }
-
- public float[] Confidence { get; set; }
-
- public List Contexts { get; set; }
-
- public bool? ResetContexts { get; set; }
-
- public OriginalRequest OriginalRequest { get; set; }
-
- ///
- /// Agent directory
- ///
- public string AgentDir { get; set; }
-
- ///
- /// What model is used to predict.
- ///
- public string Model { get; set; }
-
- public AIRequest()
- {
- Contexts = new List();
- }
-
- public AIRequest(string text)
- {
- Query = new string[] { text };
- Confidence = new float[] { 1.0f };
- Contexts = new List();
- }
-
- public AIRequest(string text, RequestExtras requestExtras) : this(text)
- {
- if (requestExtras != null)
- {
- requestExtras.CopyTo(this);
- }
- }
-
- }
-}
diff --git a/Platform.Dialogflow/Models/AIResponse.cs b/Platform.Dialogflow/Models/AIResponse.cs
deleted file mode 100644
index 781ae203..00000000
--- a/Platform.Dialogflow/Models/AIResponse.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Platform.Dialogflow.Models
-{
- public class AIResponse
- {
- public string Id { get; set; }
-
- public DateTime Timestamp { get; set; }
-
- public string Lang { get; set; }
-
- public AIResponseResult Result { get; set; }
-
- public AIResponseStatus Status { get; set; }
-
- public string SessionId { get; set; }
-
- public bool IsError
- {
- get
- {
- if (Status != null && Status.Code >= 400)
- {
- return true;
- }
-
- return false;
- }
- }
- }
-}
diff --git a/Platform.Dialogflow/Models/AIResponseCustomPayload.cs b/Platform.Dialogflow/Models/AIResponseCustomPayload.cs
deleted file mode 100644
index 6f3a36fa..00000000
--- a/Platform.Dialogflow/Models/AIResponseCustomPayload.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Platform.Dialogflow.Models
-{
- public class AIResponseCustomPayload : AIResponseMessageBase
- {
- public string Task { get; set; }
-
- public List Parameters { get; set; }
- }
-}
diff --git a/Platform.Dialogflow/Models/AIResponseFulfillment.cs b/Platform.Dialogflow/Models/AIResponseFulfillment.cs
deleted file mode 100644
index 03e4a4a0..00000000
--- a/Platform.Dialogflow/Models/AIResponseFulfillment.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Platform.Dialogflow.Models
-{
- public class AIResponseFulfillment
- {
- public string Speech { get; set; }
-
- public List