Skip to content

Commit 0cb47af

Browse files
authored
Improve credentials docs (#850)
Part of #849
1 parent e369c63 commit 0cb47af

15 files changed

+50
-59
lines changed

R/utils.R

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,21 @@ cli_escape <- function(x) {
173173

174174
api_key_param <- function(key) {
175175
paste_c(
176-
"A function that returns the API key to use for authentication.\n",
177-
"\n",
176+
"Override the default credentials. ",
178177
c(
179178
"You generally should not need this argument; instead set the ",
180179
c("`", key, "`"),
181-
" environment variable.\n"
180+
" environment variable. "
182181
),
183182
c(
184183
"The best place to set this is in `.Renviron`,
185184
which you can easily edit by calling `usethis::edit_r_environ()`."
185+
),
186+
"\n\n",
187+
c(
188+
"If you do need additional control, this argument takes a ",
189+
"zero-argument function that returns either a string (the API key), ",
190+
"or a named list (added as additional headers to every request)."
186191
)
187192
)
188193
}

man/chat_anthropic.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_azure_openai.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_cloudflare.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_deepseek.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_github.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_groq.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_huggingface.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_mistral.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_openai.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)