check_api {gptstudio} | R Documentation |
Check API setup
Description
This function checks whether the API key provided in the OPENAI_API_KEY
environment variable is valid. This function will not re-check an API if it
has already been validated in the current session.
Usage
check_api()
Value
Nothing is returned. If the API key is valid, a success message is printed. If the API key is invalid, an error message is printed and the function aborts.
Examples
# Call the function to check the API key
## Not run:
check_api()
## End(Not run)
[Package gptstudio version 0.3.0 Index]