From a331d789df738405ac0181e87921e33c0f63fceb Mon Sep 17 00:00:00 2001 From: Samuel Calderon Date: Wed, 30 Oct 2024 20:50:48 -0500 Subject: [PATCH 1/4] update request body for checking anthropic connection. fixes #231 --- R/gptstudio-sitrep.R | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/R/gptstudio-sitrep.R b/R/gptstudio-sitrep.R index d139dc7f..6eddf504 100644 --- a/R/gptstudio-sitrep.R +++ b/R/gptstudio-sitrep.R @@ -43,9 +43,11 @@ check_api_connection_anthropic <- function(service, api_key) { request_base_anthropic(key = Sys.getenv("ANTHROPIC_API_KEY")) |> req_body_json( data = list( - prompt = "\n\nHuman: Hello, Claude\n\nAssistant:", - model = "claude-2.1", - max_tokens_to_sample = 1024 + model = "claude-3-haiku-20240307", + max_tokens = 1024, + messages = list( + list(role = "user", content = "Hello, Claude") + ) ) ) |> req_error(is_error = function(resp) FALSE) |> From 53801c66f5c334e5bc7d7121f97d53583d1220cd Mon Sep 17 00:00:00 2001 From: Samuel Calderon Date: Wed, 30 Oct 2024 20:55:41 -0500 Subject: [PATCH 2/4] add news --- NEWS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 94b153f7..4b434618 100644 --- a/NEWS.md +++ b/NEWS.md @@ -14,6 +14,7 @@ - Remove magrittr pipe in favor of base pipe, require R >= 4.1 #226 - Tweak app sidebar and set min version of bsicons and httr2 #228 - Added info tooltips to the API service settings to inform users to save after modifying this section #230 +- Fixed a bug in `gptstudio_sitrep()` that prevented it to correctly report an active `ANTHROPIC_API_KEY` ## gptstudio 0.4.0 @@ -119,7 +120,7 @@ The ChatGPT addin can now speak German! Thanks to [Mark Colley](https://github.c ### Translations -The ChatGPT addin can now receive translations. If anyone wants to contribute with a new translation only needs to edit the translation file ("inst/translations/translation.json"). Currently supported languages are English and Spanish. +The ChatGPT addin can now receive translations. If anyone wants to contribute with a new translation only needs to edit the translation file ("inst/translations/translation.json"). Currently supported languages are English and Spanish. ### `{httr2}` From 5654b4d3adef7fefb4af13801a6035389c3c77e8 Mon Sep 17 00:00:00 2001 From: Samuel Calderon Date: Wed, 30 Oct 2024 20:57:28 -0500 Subject: [PATCH 3/4] fix checkboxes in pull request template --- .github/pull_request_template.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f5802402..af91aadd 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,12 +8,12 @@ ## For contributors -- [] I have added the relevant changes to the NEWS.md file -- [] I have added relevant tests or documentation with my changes +- [ ] I have added the relevant changes to the NEWS.md file +- [ ] I have added relevant tests or documentation with my changes ## For reviewers -- [] Changes meet the acceptance criteria of the related issue -- [] The contribution follows style conventions and code of conduct -- [] Branch passes automated testing -- [] I have incremented the package version in the DESCRIPTION file before merging +- [ ] Changes meet the acceptance criteria of the related issue +- [ ] The contribution follows style conventions and code of conduct +- [ ] Branch passes automated testing +- [ ] I have incremented the package version in the DESCRIPTION file before merging From 7ba682e6ec074e3df16666017291dd58473393ac Mon Sep 17 00:00:00 2001 From: James Wade Date: Thu, 31 Oct 2024 12:14:18 -0400 Subject: [PATCH 4/4] Increment version number to 0.4.0.9009 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 869ed567..461fc07f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: gptstudio Title: Use Large Language Models Directly in your Development Environment -Version: 0.4.0.9008 +Version: 0.4.0.9009 Authors@R: c( person("Michel", "Nivard", , "m.g.nivard@vu.nl", role = c("aut", "cph")), person("James", "Wade", , "github@jameshwade.com", role = c("aut", "cre", "cph"),