View source: R/gateway_keyring.R
set_key | R Documentation |
Securely stores your your OpenAI API key to your OS keyring.
set_key(key = NULL)
key |
Optional string of your OpenAI API key; if not provided, a popup will ask you to enter it (safer). |
No return value; only side-effect and message printed to console
# CAREFUL: Changes your OpenAI API key in your OS keyring
## Not run:
set_key("sk-my-api-key") # sets the key directly (will show in .Rhistory)
set_key() # opens a system popup for secure entry
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.