chatbotUI: chatbotUI Shiny UI Module

Description Usage Arguments Examples

Description

An user interface for your shiny watson assistant apps

Usage

1

Arguments

id

namespace id

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
if(interactive()){
### APP ###
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
  dashboardHeader(),
    dashboardSidebar(),
      dashboardBody(uiOutput("context"),
                      IMWatson::chatbotUI("watson"))
                      )
server <- function(input, output, session) {
rv <- reactiveValues(rv.chat = FALSE)
bot <- reactive({
callModule(IMWatson::chatbox, "watson", texlog)
})
output$context <- renderUI(bot()$magic)
}
shinyApp(ui, server)
 }

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