Skip to content

Commit 4e91141

Browse files
authored
Merge pull request #147 from mlverse/updates
Addresses new dimension for ellmer tokens
2 parents d3a63b1 + dff11e3 commit 4e91141

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: chattr
22
Title: Interact with Large Language Models in 'RStudio'
3-
Version: 0.3.0
3+
Version: 0.3.0.9000
44
Authors@R: c(
55
person("Edgar", "Ruiz", , "edgar@posit.co", role = c("aut", "cre")),
66
person(given = "Posit Software, PBC", role = c("cph", "fnd"))
@@ -22,7 +22,7 @@ Imports:
2222
lifecycle,
2323
processx,
2424
config,
25-
ellmer (>= 0.2.0),
25+
ellmer (>= 0.3.0),
2626
purrr,
2727
rlang,
2828
bslib,

R/backend-ellmer.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ ch_ellmer_history <- function(x) {
8484
ellmer::Turn(
8585
role = .x$role,
8686
contents = list(ellmer::ContentText(.x$content)),
87-
tokens = .x$tokens %||% c(0, 0)
87+
tokens = .x$tokens %||% c(0, 0, 0)
8888
)
8989
}
9090
)

tests/testthat/_snaps/app-ui.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
[4] " <div style=\"top:0px;left:0.1px;width:100%;position:fixed;cursor:inherit; z-index: 10;background-color: #E1E2E5;\">"
2121
[5] " <div class=\"row\">"
2222
[6] " <div class=\"col-sm-11\" style=\"width: 85%;\">"
23-
[7] " <div class=\"form-group shiny-input-container\" style=\"width: 100%;\">"
23+
[7] " <div class=\"shiny-input-textarea form-group shiny-input-container\" style=\"width:100%;\">"
2424
[8] " <label class=\"control-label shiny-label-null\" for=\"prompt\" id=\"prompt-label\"></label>"
25-
[9] " <textarea id=\"prompt\" class=\"shiny-input-textarea form-control\" style=\"width:100%;resize:none;\"></textarea>"
25+
[9] " <textarea id=\"prompt\" class=\"form-control\" style=\"width:100%;resize:none;\" data-update-on=\"change\"></textarea>"
2626
[10] " </div>"
2727
[11] " </div>"
2828
[12] " <div class=\"col-sm-1\" style=\"width: 15%;\">"
@@ -54,19 +54,19 @@
5454
[4] " <div class=\"modal-body\">"
5555
[5] " <p>Save / Load Chat</p>"
5656
[6] " <hr/>"
57-
[7] " <div class=\"form-group shiny-input-container\">"
57+
[7] " <div class=\"shiny-input-textarea form-group shiny-input-container\">"
5858
[8] " <label class=\"control-label\" id=\"prompt2-label\" for=\"prompt2\">Prompt</label>"
59-
[9] " <textarea id=\"prompt2\" class=\"shiny-input-textarea form-control\">For code output, use RMarkdown code chunks"
59+
[9] " <textarea id=\"prompt2\" class=\"form-control\" data-update-on=\"change\">For code output, use RMarkdown code chunks"
6060
[10] "Avoid all code chunk options</textarea>"
6161
[11] " </div>"
6262
[12] " <br/>"
6363
[13] " <div class=\"form-group shiny-input-container\">"
6464
[14] " <label class=\"control-label\" id=\"i_data-label\" for=\"i_data\">Max Data Frames</label>"
65-
[15] " <input id=\"i_data\" type=\"text\" class=\"shiny-input-text form-control\" value=\"0\"/>"
65+
[15] " <input id=\"i_data\" type=\"text\" class=\"shiny-input-text form-control\" value=\"0\" data-update-on=\"change\"/>"
6666
[16] " </div>"
6767
[17] " <div class=\"form-group shiny-input-container\">"
6868
[18] " <label class=\"control-label\" id=\"i_files-label\" for=\"i_files\">Max Data Files</label>"
69-
[19] " <input id=\"i_files\" type=\"text\" class=\"shiny-input-text form-control\" value=\"0\"/>"
69+
[19] " <input id=\"i_files\" type=\"text\" class=\"shiny-input-text form-control\" value=\"0\" data-update-on=\"change\"/>"
7070
[20] " </div>"
7171
[21] " <div class=\"form-group shiny-input-container\">"
7272
[22] " <div class=\"checkbox\">"

tests/testthat/_snaps/chattr-use.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@
3636
3737
-- chattr
3838
* Provider: Anthropic
39-
* Model: claude-3-7-sonnet-latest
40-
* Label: claude-3-7-sonnet-latest (Anthropic)
39+
* Model: claude-sonnet-4-20250514
40+
* Label: claude-sonnet-4-20250514 (Anthropic)
4141

tests/testthat/test-app-server.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test_that("Testing the function directly", {
1414
)
1515
expect_null(
1616
shiny::testServer(app_server, {
17-
session$setInputs(open = TRUE)
17+
#session$setInputs(open = TRUE)
1818
})
1919
)
2020
expect_null(

0 commit comments

Comments
 (0)