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
)

Arguments

project_info

A Finn project from set_project_info()

driver_llm

A Chat LLM object

input_data

A data frame or tibble containing the input data

forecast_horizon

The number of periods to forecast

external_regressors

Optional character vector of external regressors

hist_end_date

Optional Date object indicating the end of the historical data

hist_start_date

Optional Date object indicating the start of the historical data

back_test_scenarios

Optional character vector of back test scenarios

back_test_spacing

Optional numeric value for back test spacing

combo_cleanup_date

Optional Date object for combo cleanup

allow_hierarchical_forecast

Logical indicating whether to allow hierarchical forecasting

reason_llm

Optional Chat LLM object for reasoning tasks

overwrite

Logical indicating whether to overwrite existing agent run info

Value

A list containing the agent run information

Examples

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
)
} # }