AutoGenAI is a provider-agnostic R framework for joint
optimization of prompts, model providers, and generation strategies.
library(AutoGenAI)
ex <- autogenai_example()
fit <- optimize_ai(
task = ex$task,
data = ex$data,
providers = ex$providers,
prompts = ex$prompts,
temperatures = c(0, 0.2),
strategies = c("single", "self_consistency")
)
fit
pareto_ai(fit)
select_configuration(fit, preference = "balanced")my_provider <- ai_provider(
name = "my-model",
generate = function(prompt, input, params) {
# Call any external model here and return text.
paste(prompt, input)
},
input_cost_per_1k = 0,
output_cost_per_1k = 0
)The package itself does not require API keys and does not contact external services during checks.