R/run_chatgpt_app.R

Defines functions run_chatgpt_app

Documented in run_chatgpt_app

#' Run the ChatGPT app
#'
#' This starts the chatgpt app. It is exported to be able to run it from an R
#' script.
#'
#' @param ide_colors List containing the colors of the IDE theme.
#' @inheritParams shiny::runApp
#'
#' @return Nothing.
#' @export
run_chatgpt_app <- function(ide_colors = get_ide_theme_info(),
                            host = getOption("shiny.host", "127.0.0.1"),
                            port = getOption("shiny.port")) {
  ui <- mod_app_ui("app", ide_colors)

  server <- function(input, output, session) {
    mod_app_server("app", ide_colors)
  }

  shiny::shinyApp(ui, server, options = list(host = host, port = port))
}

Try the gptstudio package in your browser

Any scripts or data that you put into this service are public.

gptstudio documentation built on May 29, 2024, 12:30 p.m.