Display or return the conversation turns from the active session.
Usage
hal_history(
role = NULL,
pattern = NULL,
format = c("console", "data.frame", "text"),
n = NULL
)Examples
# with no active session this returns an empty data frame
hal_history(format = "data.frame")
#> ℹ No active session.
#> data frame with 0 columns and 0 rows
if (FALSE) { # \dontrun{
hal_history() # print all turns
hal_history(role = "user", n = 5) # last five user prompts
hal_history(pattern = "ggplot") # turns mentioning ggplot
} # }
