ReAct (Reasoning and Acting) using R code execution - Optimized Version
react_using_r(
chat_obj,
task,
max_turns = 15,
pkgs_to_use = c(),
objects_to_use = list(),
existing_session = NULL,
verbose = TRUE,
r_session_options = list(),
context_window_size = 3000,
max_observation_length = 800,
error_escalation_threshold = 3
)List with complete ReAct results
Chat object from ellmer
Character string. The task description to be solved
Integer. Maximum number of ReAct turns (default: 15)
Character vector. R packages to load in session
Named list. Objects to load in R session
Existing callr session to continue from (optional)
Logical. Whether to print progress information
List. Options for callr R session
Integer. Maximum characters before history summary (default: 3000)
Integer. Maximum observation length (default: 800)
Integer. Error count threshold for escalation (default: 3)