Description Usage Arguments Examples
An user interface for your shiny watson assistant apps
1 | chatbotUI(id)
|
id |
namespace id |
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.