BotSharp/Platforms/BotSharp.Platform.Dialogflow
2023-05-20 16:31:31 -05:00
..
BotSharp.Platform.Dialogflow.csproj clean project. 2023-05-20 16:31:31 -05:00
README.md Adjust file structure. 2023-05-20 10:20:37 -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