chatbot: chatbot Shiny server Module

Description Usage Arguments Details Examples

Description

chatbot Shiny server Module

Usage

1
chatbot(input, output, session, api_key, workspace, rv.chat = FALSE)

Arguments

input

input variable to read the value from

output

output variable to read the value from

session

session variable to read the value from

api_key

api key to connect to your watson assistant

workspace

your watson assistant workspace

rv.chat

optional variable to pass your chatbot as a reactive variable

Details

A shiny server module for the chatbot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if(interactive()){
## app.R ##
library(shiny)
library(shinydashboard)
library(IMWatson)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(IMWatson::chatbotUI("watson"))
)
server <- function(input, output, session) {
callModule(IMWatson::chatbot, "watson", api_key = your_api_key,
workspace = your_workspace)
 }
 shinyApp(ui, server)
 }

IMWatson documentation built on May 2, 2019, 2:43 a.m.