gptstudio
GPT RStudio addins that enable GPT assisted coding, writing & analysis
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (19.2%) to scientific vocabulary
Keywords
chatgpt
gpt-3
r
rstats
rstats-package
rstudio
rstudio-addin
Keywords from Contributors
report
Last synced: 6 months ago
·
JSON representation
Repository
GPT RStudio addins that enable GPT assisted coding, writing & analysis
Basic Info
- Host: GitHub
- Owner: MichelNivard
- License: other
- Language: R
- Default Branch: main
- Homepage: https://michelnivard.github.io/gptstudio/
- Size: 56.9 MB
Statistics
- Stars: 960
- Watchers: 21
- Forks: 115
- Open Issues: 10
- Releases: 4
Topics
chatgpt
gpt-3
r
rstats
rstats-package
rstudio
rstudio-addin
Created about 3 years ago
· Last pushed 8 months ago
Metadata Files
Readme
Changelog
Contributing
License
Code of conduct
Support
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# gptstudio
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://CRAN.R-project.org/package=gptstudio)
[](https://app.codecov.io/gh/MichelNivard/gptstudio?branch=main)
[](https://github.com/MichelNivard/gptstudio/actions/workflows/R-CMD-check.yaml)
[](https://www.r-pkg.org/pkg/gptstudio)
[](https://www.r-pkg.org/pkg/gptstudio)
The goal of gptstudio is for R programmers to easily incorporate use of large language models (LLMs) into their project workflows. These models appear to be a step change in our use of text for knowledge work, but you should carefully consider ethical implications of using these models.
For further addins, tailored for R developers, also see the sister package: [gpttools](https://jameshwade.github.io/gpttools/)
## Getting Started: Installation & AI Service Setup
```{r}
#| eval: false
install.packages("gptstudio")
```
To get a bug fix or to use a feature from the development version, you can install the development version of this package from GitHub.
```{r}
#| eval: false
# install.packages("pak")
pak::pak("MichelNivard/gptstudio")
```
### Available AI Services and Models
| AI Service | Models | Documentation | Setup |
| ---- | ---- | ---- | ---- |
| [OpenAI](https://platform.openai.com) | gpt-4-turbo, gpt-4, gpt-3.5-turbo ([latest models](https://platform.openai.com/docs/models)) | [OpenAI API Docs](https://platform.openai.com/docs/api-reference) | [OpenAI Setup](https://michelnivard.github.io/gptstudio/articles/openai.html) |
| [HuggingFace](https://huggingface.co/) | various | [HF Inference API Docs](https://huggingface.co/docs/hub/models-inference) | [HF Setup](https://michelnivard.github.io/gptstudio/articles/huggingface.html) |
| [Anthropic](https://docs.anthropic.com/claude/docs/guide-to-anthropics-prompt-engineering-resources) | claude-3.5, claude-2.1, claude-instant-1.2 | [Anthropic API Docs](https://docs.anthropic.com/claude/reference/getting-started-with-the-api) | [Anthropic Setup](https://michelnivard.github.io/gptstudio/articles/anthropic.html) |
| [Ollama](https://ollama.com/) | mistral, llama2, mixtral, phi ([latest models](https://ollama.com/library)) | [Ollama API Docs](https://github.com/ollama/ollama/blob/main/docs/api.md) | [Ollama Setup](https://michelnivard.github.io/gptstudio/articles/ollama.html) |
| [Perplexity](https://www.perplexity.ai) | pplx-7b-chat, pplx-70b-chat, pplx-7b-online, pplx-70b-online, llama-2-70b-chat, codellama-34b-instruct, mistral-7b-instruct, and mixtral-8x7b-instruct | [Perplexity API Docs](https://docs.perplexity.ai/reference/post_chat_completions) | [Perplexity Setup](https://michelnivard.github.io/gptstudio/articles/perplexity.html) |
| [Google AI Studio](https://ai.google.dev/tutorials/ai-studio_quickstart) | Gemini and Palm (legacy) | [Google AI Studio Docs](https://ai.google.dev/docs) | [Google AI Studio Setup](https://michelnivard.github.io/gptstudio/articles/google.html) |
| [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/overview) | gpt-4, gpt-3.5-turbo ([latest models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-preview)) | [Azure OpenAI API Docs](https://learn.microsoft.com/en-us/azure/ai-services/openai/quickstart?tabs=command-line,python&pivots=rest-api) | [Azure OpenAI Setup](https://michelnivard.github.io/gptstudio/articles/azure.html) |
| [Cohere](https://cohere.com/) | command, command-light, command-nightly, command-light-nightly | [Cohere API Docs](https://docs.cohere.com/) | [Cohere Setup](https://michelnivard.github.io/gptstudio/articles/cohere.html) |
### Default AI Service: OpenAI
To get started, you must first set up an API service. The package is configured to work with several AI service providers, allowing for flexibility and choice based on your specific needs. The default configuration is set to use OpenAI's services. To use it you need:
1. Make an OpenAI account. [Sign up here](https://openai.com/api/).
2. [Create an OpenAI API key](https://platform.openai.com/account/api-keys) to use with the package.
3. Set the API key up in Rstudio. See the section below on configuring the API key.
#### Configuring OpenAI API Key
To interact with the OpenAI API, it's required to have a valid `OPENAI_API_KEY` environment variable. Here are the steps to configure it.
You can establish this environment variable globally by including it in your project's .Renviron file. This approach ensures that the environment variable persists across all sessions as the Shiny app runs in the background.
Here is a set of commands to open the .Renviron file for modification:
```{r}
#| eval: false
require(usethis)
edit_r_environ()
```
For a persistent setting that loads every time you launch this project, add the following line to .Renviron, replacing `""` with your actual API key:
``` bash
OPENAI_API_KEY=""
```
**Caution:** If you're using version control systems like GitHub or GitLab, remember to include .Renviron in your .gitignore file to prevent exposing your API key!
**Important Note:** OpenAI API will not function without valid payment details entered into your OpenAI account. This is a restriction imposed by OpenAI and is unrelated to this package.
### Alternative AI Service Providers
While OpenAI is the default and currently considered one of the most robust options, `gptstudio` is also compatible with other AI service providers. These include [Anthropic](https://michelnivard.github.io/gptstudio/articles/anthropic.html), [HuggingFace](https://michelnivard.github.io/gptstudio/articles/huggingface.html), [Google AI Studio](https://michelnivard.github.io/gptstudio/articles/google.html), [Azure OpenAI](https://michelnivard.github.io/gptstudio/articles/azure.html), and [Perplexity](https://michelnivard.github.io/gptstudio/articles/perplexity.html). You can select any of these providers based on your preference or specific requirements. You can also run local models with [Ollama](https://michelnivard.github.io/gptstudio/articles/ollama.html). This requires more setup but at the benefit of not sharing your data with any third party.
To use an alternative provider, you will need to obtain the relevant API key or access credentials from the chosen provider and configure them similarly.
## Privacy Notice for gptstudio
This privacy notice is applicable to the R package that uses popular language models like gpt-4 turbo and claude-3.5. By using this package, you agree to adhere to the privacy terms and conditions set by the API service.
### Data Sharing with AI Services
When using this R package, any text or code you highlight/select with your cursor, or the prompt you enter within the built-in applications, will be sent to the selected AI service provider (e.g., OpenAI, Anthropic, HuggingFace, Google AI Studio, Azure OpenAI) as part of an API request. This data sharing is governed by the privacy notice, rules, and exceptions that you agreed to with the respective service provider when creating an account.
### Security and Data Usage by AI Service Providers
We cannot guarantee the security of the data you send via the API to any AI service provider, nor can we provide details on how each service processes or uses your data. However, these providers often state that they use prompts and results to enhance their AI models, as outlined in their terms of use. Be sure to review the terms of use of the respective AI service provider directly.
### Limiting Data Sharing
The R package is designed to share only the text or code that you specifically highlight/select or include in a prompt through our built-in applications. No other elements of your R environment will be shared unless you turn those features on. It is your responsibility to ensure that you do not accidentally share sensitive data with any AI service provider.
**IMPORTANT: To maintain the privacy of your data, do not highlight, include in a prompt, or otherwise upload any sensitive data, code, or text that should remain confidential.**
## Code of Conduct
Please note that the gptstudio project is released with a [Contributor Code of Conduct](https://github.com/MichelNivard/gptstudio/blob/main/.github/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.
Owner
- Name: Michel Nivard
- Login: MichelNivard
- Kind: user
- Twitter: michelnivard
- Repositories: 2
- Profile: https://github.com/MichelNivard
GitHub Events
Total
- Issues event: 28
- Watch event: 71
- Delete event: 9
- Issue comment event: 83
- Push event: 100
- Pull request review comment event: 9
- Pull request review event: 13
- Pull request event: 28
- Fork event: 16
- Create event: 9
Last Year
- Issues event: 28
- Watch event: 71
- Delete event: 9
- Issue comment event: 83
- Push event: 100
- Pull request review comment event: 9
- Pull request review event: 13
- Pull request event: 28
- Fork event: 16
- Create event: 9
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| James Wade | g****b@j****m | 342 |
| Samuel Calderon | s****n@u****e | 257 |
| repo-visualizer | r****r | 109 |
| Michel Nivard | m****d@g****m | 73 |
| Iakov Davydov | 6****v | 5 |
| Anatoliy Sokolov | a****v@d****m | 5 |
| michel nivard | n****d@1****2 | 5 |
| Samuel Calderon | S****l@W****l | 4 |
| Steve G Brooks | s****s@g****m | 1 |
| Mark Colley | 3****y | 1 |
| Jose F Oviedo | 8****o | 1 |
| michel nivard | n****d@M****l | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 129
- Total pull requests: 128
- Average time to close issues: about 1 month
- Average time to close pull requests: 5 days
- Total issue authors: 75
- Total pull request authors: 7
- Average comments per issue: 3.57
- Average comments per pull request: 0.73
- Merged pull requests: 123
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 16
- Pull requests: 29
- Average time to close issues: 26 days
- Average time to close pull requests: 17 days
- Issue authors: 10
- Pull request authors: 4
- Average comments per issue: 3.75
- Average comments per pull request: 1.07
- Merged pull requests: 25
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- calderonsamuel (23)
- JamesHWade (17)
- MichelNivard (12)
- stevegbrooks (4)
- jakeberv (2)
- vincentoh698 (1)
- jonthegeek (1)
- JoeFernando (1)
- Ayopeters (1)
- AlPaRol (1)
- ichsan2895 (1)
- smalltiger-moquan (1)
- lebjulien (1)
- klatta87 (1)
- DaXuanGarden (1)
Pull Request Authors
- JamesHWade (90)
- calderonsamuel (59)
- stevegbrooks (6)
- SokolovAnatoliy (2)
- idavydov (2)
- M-Colley (1)
- josefoviedo (1)
Top Labels
Issue Labels
feature (25)
bug (22)
upkeep (5)
documentation (5)
help wanted :heart: (4)
good first issue :heart: (3)
stuck 🚧 (1)
Pull Request Labels
upkeep (4)
bug (2)
Packages
- Total packages: 3
-
Total downloads:
- cran 770 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 12
- Total maintainers: 1
proxy.golang.org: github.com/michelnivard/gptstudio
- Documentation: https://pkg.go.dev/github.com/michelnivard/gptstudio#section-documentation
- License: other
-
Latest release: v0.4.0
published almost 2 years ago
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced:
6 months ago
proxy.golang.org: github.com/MichelNivard/gptstudio
- Documentation: https://pkg.go.dev/github.com/MichelNivard/gptstudio#section-documentation
- License: other
-
Latest release: v0.4.0
published almost 2 years ago
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced:
6 months ago
cran.r-project.org: gptstudio
Use Large Language Models Directly in your Development Environment
- Homepage: https://github.com/MichelNivard/gptstudio
- Documentation: http://cran.r-project.org/web/packages/gptstudio/gptstudio.pdf
- License: MIT + file LICENSE
-
Latest release: 0.4.0
published almost 2 years ago
Rankings
Stargazers count: 0.4%
Forks count: 0.8%
Downloads: 10.0%
Average: 12.7%
Dependent repos count: 23.9%
Dependent packages count: 28.7%
Maintainers (1)
Last synced:
6 months ago
Dependencies
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/pr-fetch v2 composite
- r-lib/actions/pr-push v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION
cran
- assertthat * imports
- bslib * imports
- cli * imports
- fs * imports
- glue * imports
- jsonlite * imports
- lifecycle * imports
- magrittr * imports
- miniUI * imports
- purrr * imports
- readr * imports
- rlang * imports
- rstudioapi >= 0.12 imports
- shiny * imports
- skimr * imports
- stringr * imports
- usethis * imports
- withr * imports
- covr * suggests
- httr * suggests
- mockr * suggests
- quarto * suggests
- spelling * suggests
- testthat >= 3.0.0 suggests
- uuid * suggests
.github/workflows/diagram.yml
actions
- actions/checkout master composite
- githubocto/repo-visualizer main composite
.github/workflows/lint.yaml
actions
- actions/checkout v4 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite