on_startup {groqR} | R Documentation |
Function to Handle Package Startup Logic
Description
The on_startup
function is designed to execute certain actions when the package is loaded.
Specifically, it checks for the presence of required environment variables related to the GROQ system.
If any of these variables are missing, it will launch a Shiny application.
Usage
on_startup(uiStartup = uiInit, serverStartup = serverInit)
Arguments
uiStartup |
Shiny user interface. |
serverStartup |
Shiny server. |
Details
The function checks the following environment variables:
-
GROQ_model
-
GROQ_systemRole
-
GROQ_API_KEY
-
GROQ_maxTokens
-
GROQ_temperature
-
GROQ_top_p
-
GROQ_proxy
If any of these variables are not set (i.e., are empty strings), the function triggers the
launch of a Shiny application defined by the ui
and server
components.
Value
None
See Also
shinyApp
[Package groqR version 0.0.3 Index]