Skip to content

Commit

Permalink
transition .env -> .Renviron
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Oct 8, 2024
1 parent 5089f4d commit e72d001
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ BugReports: https://github.com/simonpcouch/pal/issues
Imports:
cli,
coro,
dotenv,
glue,
elmer,
rlang,
Expand Down
5 changes: 0 additions & 5 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# nocov start

.onLoad <- function(libname, pkgname) {
# automatically source .env for API keys on package load
if (file.exists(".env")) {
dotenv::load_dot_env()
}

prompts <- list.files(system.file("prompts", package = "pal"), full.names = TRUE)
for (prompt in prompts) {
id <- gsub(".md", "", basename(prompt))
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can install pal like so:
pak::pak("simonpcouch/pal")
```

Then, ensure that you have an [`ANTHROPIC_API_KEY`](https://console.anthropic.com/) set in your [`.env`](https://github.com/gaborcsardi/dotenv). If you'd like to use an LLM other than Anthropic's Claude 3.5 Sonnet—like OpenAI's ChatGPT—to power the pal, see `?pal()` to set default metadata on that model.
Then, ensure that you have an [`ANTHROPIC_API_KEY`](https://console.anthropic.com/) set in your `.Renviron`---see [usethis::edit_r_environ()](https://usethis.r-lib.org/reference/edit.html) for more information. If you'd like to use an LLM other than Anthropic's Claude 3.5 Sonnet—like OpenAI's ChatGPT—to power the pal, see [`?pal()`](https://simonpcouch.github.io/pal/reference/pal.html) for information on how to set default metadata on that model.


## Example
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ pak::pak("simonpcouch/pal")

Then, ensure that you have an
[`ANTHROPIC_API_KEY`](https://console.anthropic.com/) set in your
[`.env`](https://github.com/gaborcsardi/dotenv). If you’d like to use an
LLM other than Anthropic’s Claude 3.5 Sonnet—like OpenAI’s ChatGPT—to
power the pal, see `?pal()` to set default metadata on that model.
`.Renviron`—see
[usethis::edit_r_environ()](https://usethis.r-lib.org/reference/edit.html)
for more information. If you’d like to use an LLM other than Anthropic’s
Claude 3.5 Sonnet—like OpenAI’s ChatGPT—to power the pal, see
[`?pal()`](https://simonpcouch.github.io/pal/reference/pal.html) for
information on how to set default metadata on that model.

## Example

Expand Down

0 comments on commit e72d001

Please sign in to comment.