Skip to content

Commit 1b2fc30

Browse files
authored
Merge pull request #116 from mlverse/updates
Release prep
2 parents 41e9a7e + 7a22cc1 commit 1b2fc30

9 files changed

+28
-24
lines changed

DESCRIPTION

+1-1
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.1.0.9006
3+
Version: 0.2.0
44
Authors@R: c(
55
person("Edgar", "Ruiz", , "[email protected]", role = c("aut", "cre")),
66
person(given = "Posit Software, PBC", role = c("cph", "fnd"))

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# chattr (dev)
1+
# chattr 0.2.0
22

33
## General
44

R/backend-databricks.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ ch_databricks_complete <- function(prompt, defaults, stream = TRUE) {
3434

3535
host <- ch_databricks_host(defaults)
3636
host_url <- url_parse(host)
37-
if(is.null(host_url$scheme)) host_url$scheme <- "https"
37+
if (is.null(host_url$scheme)) host_url$scheme <- "https"
3838

39-
user_agent <-paste0("chattr/", utils::packageVersion('chattr'))
39+
user_agent <- paste0("chattr/", utils::packageVersion("chattr"))
4040

4141
req_result <- host_url %>%
4242
url_build() %>%

R/backend-openai.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,11 @@ ch_openai_error <- function(x, use_abort = TRUE) {
201201
"Error from OpenAI\n",
202202
substr(x, 10, nchar(x))
203203
)
204-
if(use_abort) {
204+
if (use_abort) {
205205
abort(error_msg)
206206
} else {
207207
cli_alert_warning(error_msg)
208208
}
209-
210209
}
211210
invisible()
212211
}

R/ch-r.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ch_r_error <- function() {
4949
err <- ch_env$r_session$read_error()
5050
if (err != "") {
5151
error_marker <- "! {error}"
52-
if(substr(err, 1, nchar(error_marker)) == error_marker) {
52+
if (substr(err, 1, nchar(error_marker)) == error_marker) {
5353
err <- substr(err, nchar(error_marker) + 1, nchar(err))
5454
}
5555
out <- err

R/chattr-defaults.R

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ chattr_defaults <- function(type = "default",
6868
type <- "console"
6969
} else {
7070
type <- ui_current()
71-
7271
}
7372
}
7473

R/chattr.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ chattr <- function(prompt = NULL,
4343
while (ch_r_state() == "busy") {
4444
curr_text <- ch_r_output()
4545
ret <- c(ret, curr_text)
46-
if(ui_current() == "markdown") {
46+
if (ui_current() == "markdown") {
4747
cat(curr_text)
4848
} else {
4949
ide_paste_text(curr_text)

cran-comments.md

+20-14
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
## New package re-submission
1+
## Pakcage Submission
22

3-
Addresses CRAN comments
3+
* Fixes how it identifies the user's current UI (console, app, notebook) and
4+
appropriately outputs the response from the model end-point (#92)
45

5-
Original:
6+
* Adding support for Databricks foundation model API (DBRX, Meta Llama 3 70B,
7+
Mixtral 8x7B) (#99)
68

7-
This is a new package submission. Enables user interactivity with large-language
8-
models ('LLM') inside the 'RStudio' integrated development environment ('IDE').
9-
The user can interact with the model using the 'Shiny' app included in this
10-
package, or directly in the 'R' console. It comes with back-ends for 'OpenAI',
11-
'GitHub' 'Copilot', and 'LlamaGPT'.
9+
* Fixes how it displays error from the model end-point when being used in a
10+
notebook or the app for OpenAI
11+
12+
* Fixes how the errors from OpenAI are parsed and processed. This should make
13+
it easier for users to determine where an downstream issue could be.
14+
15+
* Adds `model` to defaults for Copilot
16+
17+
* Improves Copilot token discovery
1218

1319
## R CMD check environments
1420

15-
- Mac OS M3 (aarch64-apple-darwin23), R 4.3.3 (Local)
21+
- Mac OS M3 (aarch64-apple-darwin23), R 4.4.1 (Local)
1622

17-
- Mac OS x86_64-apple-darwin20.0 (64-bit), R 4.3.3 (GH Actions)
18-
- Windows x86_64-w64-mingw32 (64-bit), R 4.3.3 (GH Actions)
19-
- Linux x86_64-pc-linux-gnu (64-bit), R 4.3.3 (GH Actions)
20-
- Linux x86_64-pc-linux-gnu (64-bit), R 4.4.0 (dev) (GH Actions)
21-
- Linux x86_64-pc-linux-gnu (64-bit), R 4.2.3 (old release) (GH Actions)
23+
- Mac OS x86_64-apple-darwin20.0 (64-bit), R 4.4.1 (GH Actions)
24+
- Windows x86_64-w64-mingw32 (64-bit), R 4.4.1 (GH Actions)
25+
- Linux x86_64-pc-linux-gnu (64-bit), R 4.4.1 (GH Actions)
26+
- Linux x86_64-pc-linux-gnu (64-bit), (dev) (GH Actions)
27+
- Linux x86_64-pc-linux-gnu (64-bit), R 4.3.3 (old release) (GH Actions)
2228

2329
## R CMD check results
2430

tests/testthat/test-chattr-use.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test_that("Menu works", {
2020
return(1)
2121
}
2222
)
23-
print(ch_get_ymls(menu = TRUE) )
23+
print(ch_get_ymls(menu = TRUE))
2424
expect_true(
2525
ch_get_ymls(menu = TRUE) %in% c("gpt35", "gpt4", "gpt4o")
2626
)

0 commit comments

Comments
 (0)