An options manager for configuring agrillm parameters. This object provides methods to get and set all related parameters.
agrillm_optionsDirectory for caching AI responses. Default: ".agrillm" in the current working directory
List of crops and their associated names. Default: list of wheat, barley, and canola varieties
Retrieve the value of an option by its key (e.g., "crops")
Set the value of an option by its key
Reset all options to their default values
# Get default crops
agrillm_options$get("crops")
#> $wheat
#> [1] "wheat" "bread wheat" "spring wheat" "winter wheat"
#>
#> $barley
#> [1] "barley" "feed barley" "malting barley"
#>
#> $canola
#> [1] "canola" "oilseed rape" "rapeseed"
#>
# Set custom values
agrillm_options$set("crops" = list(
wheat = c("wheat", "bread wheat"),
barley = c("barley", "feed barley"),
canola = c("canola", "oilseed rape")
))
#> Warning: AZURE_OPENAI_API_KEY environment variable is not set. Azure LLM calls will fail.
#> Warning: AZURE_ENDPOINT_URL environment variable is not set. Azure LLM calls will fail.
# Reset to defaults
agrillm_options$reset()