if (FALSE) {
# 2) Prepare the dataset
my_data <- walmart_sales_weekly
# 3) Create the forecasting agent
forecasting_agent <- build_forecasting_agent(
model = my_llm_wrapper,
bypass_recommended_steps = FALSE,
bypass_explain_code = FALSE,
mode = "dark", # dark or light
line_width = 3,
verbose = FALSE
)
# 4) Define the initial state
initial_state <- list(
user_instructions = "Forecast sales for the next 30 days, using `id` as the grouping variable,
a forecasting horizon of 30, and a confidence level of 90%.",
data_raw = my_data
)
# 5) Run the agent
final_state <- forecasting_agent(initial_state)
}
Run the code above in your browser using DataLab