This function sets up the necessary information for a Finn Agent run, including input data, forecast horizon, and other parameters. It checks for existing runs and allows for overwriting if specified.
set_agent_info(
project_info,
driver_llm,
input_data,
forecast_horizon,
external_regressors = NULL,
hist_end_date = NULL,
hist_start_date = NULL,
back_test_scenarios = NULL,
back_test_spacing = NULL,
combo_cleanup_date = NULL,
allow_hierarchical_forecast = FALSE,
reason_llm = NULL,
overwrite = FALSE
)
A Finn project from set_project_info()
A Chat LLM object
A data frame or tibble containing the input data
The number of periods to forecast
Optional character vector of external regressors
Optional Date object indicating the end of the historical data
Optional Date object indicating the start of the historical data
Optional character vector of back test scenarios
Optional numeric value for back test spacing
Optional Date object for combo cleanup
Logical indicating whether to allow hierarchical forecasting
Optional Chat LLM object for reasoning tasks
Logical indicating whether to overwrite existing agent run info
A list containing the agent run information
if (FALSE) { # \dontrun{
# load example data
hist_data <- timetk::m4_monthly %>%
dplyr::filter(date >= "2013-01-01") %>%
dplyr::rename(Date = date) %>%
dplyr::mutate(id = as.character(id))
# set up Finn project
project <- set_project_info(
project_name = "Demo_Project",
combo_variables = c("id"),
target_variable = "value",
date_type = "month"
)
# set up LLM
driver_llm <- ellmer::chat_azure_openai(model = "gpt-4o-mini")
# set up agent info
agent_info <- set_agent_info(
project_info = project,
driver_llm = driver_llm,
input_data = hist_data,
forecast_horizon = 6
)
} # }