BotSharp/BotSharp.Platform.Dialogflow
2018-12-07 13:01:28 -06:00
..
Controllers ImportedAgentViewModel 2018-12-07 12:56:54 -06:00
Models Build-in a platform of Dialogflow emulator. 2018-10-28 21:16:55 -05:00
ViewModels Build-in a platform of Dialogflow emulator. 2018-10-28 21:16:55 -05:00
AgentImporterInDialogflow.cs Build-in a platform of Dialogflow emulator. 2018-10-28 21:16:55 -05:00
BotSharp.Platform.Dialogflow.csproj upgrade AspNetCore to v2.2 2018-12-07 13:01:28 -06:00
DialogflowAi.cs Build-in a platform of Dialogflow emulator. 2018-10-28 21:16:55 -05:00
ModuleInjector.cs Build-in a platform of Dialogflow emulator. 2018-10-28 21:16:55 -05: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