Sends a prompt to the OpenAI API to classify dataset variables into anonymization roles for use with the sdcMicro package. If the API key is not provided or set via `Sys.getenv("OPENAI_API_KEY")`, the function will prompt for it interactively.
query_llm_for_roles(prompt, model = "gpt-4", api_key = NULL)A named list with fields `keyVars`, `pramVars`, `numVars`, `weightVar`, `strataVar`, `hhId`. Fields are either character vectors (possibly empty) or NULL.
A character string prompt for the LLM.
The OpenAI model to use (e.g., "gpt-4").
Optional. If not provided, defaults to environment variable OPENAI_API_KEY.
Matthias Templ