Retrieve the API key for an LLM provider from the environment
Source:R/llm_provider.R
llm_api_key.RdRetrieve the API key for an LLM provider from the environment
Examples
llm_api_key("ollama") # always returns "" without checking any env var
#> [1] ""
if (nchar(Sys.getenv("ANTHROPIC_API_KEY")) > 0)
llm_api_key("anthropic")