Skip to content

Commit

Permalink
pass devtools check
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanpieper committed Oct 5, 2024
1 parent 66d7ecb commit d0a2076
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ importFrom(httr,content)
importFrom(httr,http_status)
importFrom(jsonlite,fromJSON)
importFrom(jsonlite,toJSON)
importFrom(jsonlite,write_json)
importFrom(openai,create_chat_completion)
importFrom(readr,read_csv)
importFrom(readxl,read_excel)
Expand All @@ -34,6 +35,7 @@ importFrom(shiny,br)
importFrom(shiny,column)
importFrom(shiny,conditionalPanel)
importFrom(shiny,downloadButton)
importFrom(shiny,downloadHandler)
importFrom(shiny,fileInput)
importFrom(shiny,fluidPage)
importFrom(shiny,fluidRow)
Expand All @@ -45,8 +47,11 @@ importFrom(shiny,mainPanel)
importFrom(shiny,numericInput)
importFrom(shiny,observe)
importFrom(shiny,observeEvent)
importFrom(shiny,outputOptions)
importFrom(shiny,p)
importFrom(shiny,paneViewer)
importFrom(shiny,reactive)
importFrom(shiny,reactiveVal)
importFrom(shiny,renderUI)
importFrom(shiny,req)
importFrom(shiny,runGadget)
Expand Down
31 changes: 20 additions & 11 deletions R/batchLLM_shiny.R
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
#' @title Interact with batchLLM via a Shiny Gadget
#'
#' @description This function provides a Shiny-based user interface to interact with
#' the `batchLLM` package. It allows users to configure and execute batch processing
#' through an interactive dashboard.
#'
#' @export
#' @importFrom shiny fluidPage fluidRow column titlePanel tabPanel tabsetPanel conditionalPanel HTML sidebarLayout sidebarPanel
#' @importFrom shiny textInput numericInput downloadButton updateTextInput tags tagList br hr h1 p span img uiOutput textAreaInput
#' @importFrom shiny sliderInput actionButton icon mainPanel observe req
#' @importFrom shiny selectInput updateSelectInput renderUI observeEvent
#' @importFrom shiny runGadget paneViewer fileInput showNotification
#'
#' @importFrom shiny fluidPage fluidRow column titlePanel tabPanel tabsetPanel
#' @importFrom shiny conditionalPanel HTML sidebarLayout sidebarPanel mainPanel
#' @importFrom shiny textInput numericInput downloadButton updateTextInput
#' @importFrom shiny tags tagList br hr h1 p span img uiOutput textAreaInput
#' @importFrom shiny sliderInput actionButton icon observe req
#' @importFrom shiny downloadHandler outputOptions selectInput updateSelectInput
#' @importFrom shiny renderUI observeEvent runGadget paneViewer fileInput
#' @importFrom shiny showNotification reactive reactiveVal
#' @importFrom shinydashboard dashboardPage dashboardHeader dashboardSidebar
#' @importFrom shinydashboard sidebarMenu menuItem dashboardBody tabItems
#' @importFrom shinydashboard tabItem box
#' @importFrom shinydashboard sidebarMenu menuItem dashboardBody tabItems tabItem
#' @importFrom shinydashboard box
#' @importFrom shinyWidgets pickerInput updatePickerInput radioGroupButtons
#' @importFrom DT dataTableOutput renderDataTable datatable
#' @importFrom shinyjs useShinyjs toggle hidden show hide
Expand All @@ -19,9 +27,10 @@
#' @importFrom readxl read_excel
#' @importFrom tools file_ext file_path_sans_ext
#' @importFrom stats setNames
#' @importFrom jsonlite write_json
#' @import batchLLM
batchLLM_shiny <- function() {
library(batchLLM)


df_objects <- "beliefs"

create_exportable_datatable <- function(data, filename_prefix) {
Expand Down Expand Up @@ -256,8 +265,8 @@ batchLLM_shiny <- function() {
)

server <- function(input, output, session) {
if (exists("beliefs")) {
session$userData$beliefs <- beliefs
if (!exists("beliefs")) {
session$userData$beliefs <- batchLLM::beliefs
}

all_objects <- reactiveVal(c())
Expand Down
4 changes: 3 additions & 1 deletion man/batchLLM_shiny.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0a2076

Please sign in to comment.