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 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"), 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}` 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) |>