BotSharp/Platforms/BotSharp.Platform.Dialogflow
2023-05-20 10:20:37 -05:00
..
Controllers Adjust file structure. 2023-05-20 10:20:37 -05:00
Models Adjust file structure. 2023-05-20 10:20:37 -05:00
ViewModels Adjust file structure. 2023-05-20 10:20:37 -05:00
AgentImporterInDialogflow.cs Adjust file structure. 2023-05-20 10:20:37 -05:00
BotSharp.Platform.Dialogflow.csproj Adjust file structure. 2023-05-20 10:20:37 -05:00
DialogflowAi.cs Adjust file structure. 2023-05-20 10:20:37 -05:00
ModuleInjector.cs Adjust file structure. 2023-05-20 10:20:37 -05:00
MultipartHttpClient.cs Adjust file structure. 2023-05-20 10:20:37 -05:00
PlatformSettings.cs Adjust file structure. 2023-05-20 10:20:37 -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