Learn R Programming

IMWatson (version 0.5.0)

chatbotUI: chatbotUI Shiny UI Module

Description

An user interface for your shiny watson assistant apps

Usage

chatbotUI(id)

Arguments

id

namespace id

Examples

Run this code
# NOT RUN {
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)
 }
# }

Run the code above in your browser using DataLab