[X] I have installed the development version of {gptstudio} (pak::pak("MichelNivard/gptstudio")) and tested if the problem remains.
[X] I have installed the {reprex} and {sessioninfo} packages to be able to run this issue's code snippet pak::pak(c("reprex", "sessioninfo")).
What happened?
When i run the command gptstudio::gptstudio_sitrep(), it states that I failed to connect to the Anthropic API service. However, I can confirm that I am using my own API for anthropic. Upon a closer look, I believe that the check_api_connection_anthropic function checks for connecitivity by calling for claude-2.1, which requires a request url of: "https://api.anthropic.com/v1/complete" and not ""https://api.anthropic.com/v1/messages".
gptstudio::gptstudio_sitrep()
#>
#> ── Configuration for gptstudio ─────────────────────────────────────────────────
#> Using user configuration file at
#> '/Users/ysu13/Library/Preferences/org.R-project.R/R/gptstudio/config.yml'
#>
#>
#> ── Current Settings ──
#>
#>
#>
#> - Model: claude-3-5-sonnet-20240620
#>
#> - Task: coding
#>
#> - Language: en
#>
#> - Service: anthropic
#>
#> - Custom prompt:
#>
#> - Stream: TRUE
#>
#> - Code style: tidyverse
#>
#> - Skill: beginner
#>
#>
#>
#> ── Checking API connections ──
#>
#>
#>
#> ── Checking OpenAI API connection
#>
#> ✖ API key is not set or invalid for OpenAI service.
#>
#>
#>
#> ── Checking HuggingFace API connection
#>
#> ✖ API key is not set or invalid for HuggingFace service.
#>
#>
#>
#> ── Checking Anthropic API connection
#>
#> ✖ Failed to connect to the Anthropic API service.
#>
#>
#>
#> ── Checking Google AI Studio API connection
#>
#> ✖ API key is not set or invalid for Google AI Studio service.
#>
#>
#>
#> ── Checking Azure OpenAI API connection
#>
#> ✖ API key is not set or invalid for Azure OpenAI service.
#>
#>
#>
#> ── Checking Perplexity API connection
#>
#> ✖ API key is not set or invalid for Perplexity service.
#>
#>
#>
#> ── Checking Cohere API connection
#>
#> ✖ API key is not set or invalid for Cohere service.
#>
#>
#>
#> ── Check Ollama for Local API connection
#>
#> ✖ Couldn't connect to Ollama in <http://localhost:11434>. Is it running there?
#>
#>
#>
#> ── Getting help ──
#>
#>
#>
#> See the gptstudio homepage (<https://michelnivard.github.io/gptstudio/>) for
#> getting started guides and package documentation. File an issue or contribute
#> to the package at the GitHub repo
#> (<https://github.com/MichelNivard/gptstudio>).
#> ── End of gptstudio configuration ──────────────────────────────────────────────
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Confirm setup
{gptstudio}
(pak::pak("MichelNivard/gptstudio")
) and tested if the problem remains.{reprex}
and{sessioninfo}
packages to be able to run this issue's code snippetpak::pak(c("reprex", "sessioninfo"))
.What happened?
When i run the command gptstudio::gptstudio_sitrep(), it states that I failed to connect to the Anthropic API service. However, I can confirm that I am using my own API for anthropic. Upon a closer look, I believe that the check_api_connection_anthropic function checks for connecitivity by calling for claude-2.1, which requires a request url of: "https://api.anthropic.com/v1/complete" and not ""https://api.anthropic.com/v1/messages".
Relevant log output
Session info
Code of Conduct