generate_alt_text.RdFunction to generate alt-text for data visualisations in a Quarto or R Markdown file
generate_alt_text(
flnm = NULL,
outfile = NULL,
openai_model = "gpt-5.1",
api = NULL,
user_instruct = ""
)Character string. Path and file name for the qmd or rmd file containing the plots.
Character string. Path and file name for the output file of alt-text. If not provided will write to alt-text.txt in current folder.
Character string. Name of the OpenAI model used to generate alt-text.
Character string. OpenAI API key used for authentication.
Character string (optional). Additional user instructions to refine the style or content of the alt-text; to be appended the default system prompt.