BotSharp/BotSharp.Platform.Dialogflow
2020-09-08 15:23:07 +08:00
..
Controllers fix swagger issue, fix logging 2020-09-08 15:23:07 +08:00
Models change Abstracts namespace 2019-03-16 19:55:55 -05:00
ViewModels Build-in a platform of Dialogflow emulator. 2018-10-28 21:16:55 -05:00
AgentImporterInDialogflow.cs change Abstracts namespace 2019-03-16 19:55:55 -05:00
BotSharp.Platform.Dialogflow.csproj fix swagger issue, fix logging 2020-09-08 15:23:07 +08:00
DialogflowAi.cs Fix BUG that can't match Q&A 2019-09-10 11:50:51 +08:00
ModuleInjector.cs try-update- 3.1 2020-09-07 18:17:58 +08:00
MultipartHttpClient.cs Build-in a platform of Dialogflow emulator. 2018-10-28 21:16:55 -05:00
PlatformSettings.cs Build-in a platform of Dialogflow emulator. 2018-10-28 21:16:55 -05:00
README.md Build-in Tencent Wechat channel. 2018-11-01 10:29:31 -05:00

botsharp-dialogflow

BotSharp platform extension which is compatible with Google Dialogflow.

How to install

PM> Install-Package BotSharp.Platform.Dialogflow

How to use

private IPlatformBuilder<AgentModel> nluPlatform = null;
public CustomMessageHandler(IPlatformBuilder<AgentModel> nluPlatform)
{
    this.nluPlatform = nluPlatform;
}

// send text to BotSharp platform emulator
var aIResponse = nluPlatform.TextRequest<AIResponseResult>(new AiRequest
{
    Text = requestMessage.Content,
    AgentId = "REPLACE_AGENT_ID", // replace to your chabot's id
    SessionId = requestMessage.FromUserName
});

How to run locally

git clone https://github.com/dotnetcore/BotSharp