if (FALSE) { # rlang::is_interactive() && rlang::is_installed("RSQLite")
# Quick start - chat with mtcars dataset in one line
querychat_app(mtcars)
# Add options
querychat_app(
mtcars,
greeting = "Welcome to the mtcars explorer!",
client = "openai/gpt-4o"
)
# Chat with a database table (table_name required)
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
DBI::dbWriteTable(con, "mtcars", mtcars)
querychat_app(con, "mtcars")
# Create QueryChat class object
qc <- querychat(mtcars, greeting = "Welcome to the mtcars explorer!")
# Run the app later
qc$app()
}
Run the code above in your browser using DataLab