From dff11e39c0166b6f1f4a1565c2935449be43f814 Mon Sep 17 00:00:00 2001 From: Edgar Ruiz <77294576+edgararuiz@users.noreply.github.com> Date: Mon, 11 Aug 2025 13:04:53 -0500 Subject: [PATCH] Addresses new dimension for ellmer tokens --- DESCRIPTION | 4 ++-- R/backend-ellmer.R | 2 +- tests/testthat/_snaps/app-ui.md | 12 ++++++------ tests/testthat/_snaps/chattr-use.md | 4 ++-- tests/testthat/test-app-server.R | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 466780c..99194a4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: chattr Title: Interact with Large Language Models in 'RStudio' -Version: 0.3.0 +Version: 0.3.0.9000 Authors@R: c( person("Edgar", "Ruiz", , "edgar@posit.co", role = c("aut", "cre")), person(given = "Posit Software, PBC", role = c("cph", "fnd")) @@ -22,7 +22,7 @@ Imports: lifecycle, processx, config, - ellmer (>= 0.2.0), + ellmer (>= 0.3.0), purrr, rlang, bslib, diff --git a/R/backend-ellmer.R b/R/backend-ellmer.R index 1c81fea..fe55d11 100644 --- a/R/backend-ellmer.R +++ b/R/backend-ellmer.R @@ -84,7 +84,7 @@ ch_ellmer_history <- function(x) { ellmer::Turn( role = .x$role, contents = list(ellmer::ContentText(.x$content)), - tokens = .x$tokens %||% c(0, 0) + tokens = .x$tokens %||% c(0, 0, 0) ) } ) diff --git a/tests/testthat/_snaps/app-ui.md b/tests/testthat/_snaps/app-ui.md index e2ba5e3..31b29ec 100644 --- a/tests/testthat/_snaps/app-ui.md +++ b/tests/testthat/_snaps/app-ui.md @@ -20,9 +20,9 @@ [4] "
Save / Load Chat
" [6] "