| collect_ai_context | R Documentation |
ask_ai()Collect recent error details, traceback output, warnings, active script context, session information, and lightweight workspace object summaries.
collect_ai_context(
script = NULL,
error = NULL,
traceback = NULL,
warnings = NULL,
include = c("error", "traceback", "warnings", "script", "session", "objects",
"history"),
max_context_chars = Inf,
max_error_age_secs = 300,
include_history = TRUE,
max_history_lines = 10
)
script |
Optional script text or path. If |
error |
Optional error message. Defaults to |
traceback |
Optional traceback text. Defaults to |
warnings |
Optional warning text or warning object. Defaults to
R's |
include |
Character vector of sections to include. |
max_context_chars |
Maximum formatted context characters. Defaults to
|
max_error_age_secs |
Maximum age in seconds for errors/warnings to be
included. Defaults to 300 (5 minutes). Set to |
include_history |
Whether to include recent command history. Defaults to
|
max_history_lines |
Maximum number of recent command history lines to include. Defaults to 10. |
A structured context list with class aisdk_ai_context.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.