- content
A string containing the user's input message.
- Model
A string specifying the GPT model to use (default: "gpt-4o-mini").
- temperature
A numeric value controlling the randomness of the model's output (default: 1).
- simple
Logical, if TRUE, only the content of the model's message will be returned.
- fromJSON_parsed
Logical, if TRUE, content will be parsed from JSON.
- check
Logical, if TRUE, prints detailed error information (message, type, param, code) if the API response includes an error.
If there is no error, "No error" is printed.
- api_key
A string containing the user's OpenAI API key.
Defaults to the value of the environment variable "OPENAI_API_KEY".