Skip to content

Commit

Permalink
Merge pull request #232 from MichelNivard/issue-231-antrhopic-sitrep
Browse files Browse the repository at this point in the history
Update anthropic sitrep
  • Loading branch information
JamesHWade authored Nov 1, 2024
2 parents a5bde01 + 7ba682e commit d184b7b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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}`

Expand Down
8 changes: 5 additions & 3 deletions R/gptstudio-sitrep.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) |>
Expand Down

0 comments on commit d184b7b

Please sign in to comment.