llm_api_key_env | R Documentation |
Use this when creating an LLM config to avoid placing secrets
inside R objects. Store your key in your shell or in ~/.Renviron
and reference it here by name.
llm_api_key_env(var, required = TRUE, default = NULL)
var |
Name of the environment variable (e.g., "OPENAI_API_KEY"). |
required |
If TRUE, missing variables cause an authentication error at call time. |
default |
Optional default if the environment variable is not set. |
An internal secret handle to be used as api_key = llm_api_key_env("VARNAME")
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.