Skip to content

Commit

Permalink
elmer -> ellmer
Browse files Browse the repository at this point in the history
simonpcouch committed Dec 20, 2024
1 parent 5729f14 commit 1cd8173
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ Imports:
cli (>= 3.6.3),
coro (>= 1.1.0),
glue (>= 1.8.0),
elmer,
ellmer,
miniUI (>= 0.1.1.1),
rlang (>= 1.1.4),
rstudioapi (>= 0.17.1),
@@ -34,5 +34,5 @@ Suggests:
tibble,
withr
Remotes:
hadley/elmer
tidyverse/ellmer
VignetteBuilder: knitr
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -12,5 +12,5 @@ export(prompt_edit)
export(prompt_new)
export(prompt_remove)
import(rlang)
importFrom(elmer,content_image_file)
importFrom(ellmer,content_image_file)
importFrom(glue,glue)
6 changes: 3 additions & 3 deletions R/init-pal.R
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@
#' @param role The identifier for a pal prompt. By default one
#' of `r glue::glue_collapse(paste0("[", glue::double_quote(default_roles), "]", "[pal_", default_roles, "]"), ", ", last = " or ")`,
#' though custom pals can be added with [.pal_add()].
#' @param fn A `new_*()` function, likely from the elmer package. Defaults
#' to [elmer::chat_claude()]. To set a persistent alternative default,
#' @param fn A `new_*()` function, likely from the ellmer package. Defaults
#' to [ellmer::chat_claude()]. To set a persistent alternative default,
#' set the `.pal_fn` option; see examples below.
#' @param .ns The package that the `new_*()` function is exported from.
#' @param ... Additional arguments to `fn`. The `system_prompt` argument will
@@ -46,7 +46,7 @@
role = NULL,
fn = getOption(".pal_fn", default = "chat_claude"),
...,
.ns = "elmer"
.ns = "ellmer"
) {
check_role(role, allow_default = TRUE)
if (!role %in% list_pals()) {
2 changes: 1 addition & 1 deletion R/pal-package.R
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@ utils::globalVariables(
)

# address "not imported from" R CMD check error
#' @importFrom elmer content_image_file
#' @importFrom ellmer content_image_file
#' @importFrom glue glue
NULL
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -29,8 +29,8 @@ pak::pak("simonpcouch/pal")
Then, ensure that you have an
[`ANTHROPIC_API_KEY`](https://console.anthropic.com/) environment
variable set, and you’re ready to go. If you’d like to use an LLM other
than Anthropic’s Claude 3.5 Sonnet—like OpenAI’s ChatGPT or a local ollama model—to power the
pal, see the [Getting started with
than Anthropic’s Claude 3.5 Sonnet—like OpenAI’s ChatGPT or a local
ollama model—to power the pal, see the [Getting started with
pal](https://simonpcouch.github.io/pal/articles/pal.html) vignette.

Pals are interfaced with the via the pal addin. For easiest access, we
6 changes: 3 additions & 3 deletions man/dot-init_pal.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vignettes/pal.Rmd
Original file line number Diff line number Diff line change
@@ -22,15 +22,15 @@ The pal package ships with a number of pre-engineered "roles." A pal role is a k

Under the hood, pals are driven by Large Language Models (LLMs). To use pals, you will need an API key for a commercial model or a connection to a locally hosted model.

Pals use the [elmer](https://github.com/hadley/elmer) package to interface with LLMs. Any model supported by elmer is supported by pal.
Pals use the [ellmer](https://github.com/tidyverse/ellmer) package to interface with LLMs. Any model supported by ellmer is supported by pal.

As of October 2024, we highly recommend [Anthropic's Claude Sonnet 3.5](https://www.anthropic.com/news/claude-3-5-sonnet) as the model to power your pals. Compared to other models we've tried, Claude is most likely to generate syntactically valid code that aligns with the pal's prompt well. As such, Claude is the default model used by pal. If you want to use Claude with pal, the only additional setup step you need is to set an [`ANTHROPIC_API_KEY`](https://console.anthropic.com/) in your `.Renviron`---you might use `usethis::edit_r_environ()` to open the file, and then set:

```env
ANTHROPIC_API_KEY=your.key.here
```

To use another model to power your pals, use the `.pal_fn` and `.pal_args` options. `.pal_fn` is the name of a `chat_*()` function from elmer, and `.pal_args` is a list of any non-default arguments you'd like to supply to that function. For example, to use models from OpenAI, you might write:
To use another model to power your pals, use the `.pal_fn` and `.pal_args` options. `.pal_fn` is the name of a `chat_*()` function from ellmer, and `.pal_args` is a list of any non-default arguments you'd like to supply to that function. For example, to use models from OpenAI, you might write:

```r
options(

0 comments on commit 1cd8173

Please sign in to comment.