on_startup: Function to Handle Package Startup Logic

View source: R/zzz.R

on_startupR 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


groqR documentation built on April 12, 2025, 1:36 a.m.