View source: R/aigra-user-api.R View source: R/aigra-api.R
| aigra_generate_items | R Documentation |
Runs the AIGRA Python backend pipeline to generate, solve, review, and export assessment items.
This user-facing wrapper accepts an AIGRA tabular item bank that has already
been loaded into R as a data frame. To use CSV or XLSX files, first call
aigra_read_template() and pass the resulting data frame to this function.
aigra_generate_items(
data,
model = "gemini-3.1-pro-preview",
provider = "auto",
gemini.API = NULL,
openai.API = NULL,
groq.API = NULL,
anthropic.API = NULL,
backend_path = NULL,
...
)
aigra_generate_items(
data,
model = "gemini-3.1-pro-preview",
provider = "auto",
gemini.API = NULL,
openai.API = NULL,
groq.API = NULL,
anthropic.API = NULL,
backend_path = NULL,
...
)
data |
A data frame with the standard AIGRA tabular columns. |
model |
Model name to use. |
provider |
LLM provider. Use |
gemini.API |
Optional Gemini API key. |
openai.API |
Optional OpenAI API key. |
groq.API |
Optional Groq API key. |
anthropic.API |
Optional Anthropic API key. |
backend_path |
Optional path to the AIGRA Python backend. |
... |
Additional arguments passed to |
A data frame if read_csv is TRUE; otherwise invisibly returns latest CSV path.
A data frame or list returned by the AIGRA tabular generation backend.
## Not run:
template <- aigra_read_template("template.xlsx")
result <- aigra_generate_items(
data = template,
provider = "gemini",
model = "gemini-2.5-flash",
source_language = "English",
target_language = "English",
n_clones = 1,
max_items = 1
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.