BotSharp platform extension which is compatible with Google Dialogflow.
PM> Install-Package BotSharp.Platform.Dialogflow
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
});
git clone https://github.com/dotnetcore/BotSharp