Creates a list of llm_config objects from a base configuration and sweeping
parameter vectors. Uses expand.grid() internally.
Arguments
- base_config
An llm_config object to use as the base.
- ...
Named vectors of parameter values to sweep (e.g.,
model,temperature). Parameters namedprovider,model,api_key,embedding,troubleshooting, orno_changeare set as top-level config fields; all others are placed inmodel_params.
Value
A list of llm_config objects.
Examples
base <- llm_config("openai", "gpt-4.1-nano")
cfgs <- expand_llm_config(base,
temperature = c(0, 0.5, 1),
model = c("gpt-4.1-nano", "gpt-4.1-mini"))
length(cfgs)