Experimental server module accepting provider-owned structured events. The handler receives public prompt text and attachment metadata only.
Usage
shad_chat_workbench_server(
id,
handler,
markdown = TRUE,
allow_html = FALSE,
render_part = NULL
)Examples
if (interactive()) {
ui <- page_shad(shad_chat_workbench_ui("assistant"))
server <- function(input, output, session) {
shad_chat_workbench_server("assistant", function(prompt, history) {
paste("You asked:", prompt$text)
})
}
shiny::shinyApp(ui, server)
}