Giter Site home page Giter Site logo

ichsan2895 / gptstudio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from michelnivard/gptstudio

0.0 0.0 0.0 8.31 MB

GPT RStudio addins that enable GPT assisted coding, writing & analysis

Home Page: https://michelnivard.github.io/gptstudio/

License: Other

R 100.00%

gptstudio's Introduction

gptstudio

Lifecycle: experimental CRAN status Codecov test coverage R-CMD-check CRAN RStudio mirror downloads

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. Ethics of LLMs (also called Foundation Models) is an area of very active discussion.

For further addins, tailored for R developers, also see the sister package: gpttools

Install the addins from this package:

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.

# install.packages("pak")
pak::pak("MichelNivard/gptstudio")

Privacy Notice for gptstudio

This privacy notice is applicable to the R package that utilizes the GPT-3 and GPT-3.5 API provided by OpenAI. By using this package, you agree to adhere to the privacy terms and conditions set by OpenAI.

Data Sharing with OpenAI

When using this R package, the text or code that you highlight/select with your cursor, or the prompt you enter within the built-in applications, will be sent to OpenAI as part of an API request. This data sharing is governed by the privacy notice, rules, and exceptions that you agreed to with OpenAI when creating an account.

Security and Data Usage by OpenAI

We cannot guarantee the security of the data you send to OpenAI via the API, nor can we provide details on how OpenAI processes or uses your data. However, OpenAI has stated that they utilize prompts and results to enhance their AI models, as outlined in their terms of use. You can opt-out of this data usage by contacting OpenAI directly and making an explicit request.

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. It is your responsibility to ensure that you do not accidentally share sensitive data with OpenAI.

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.

Prerequisites

  1. Make an OpenAI account.

  2. Create an OpenAI API key to use with the package.

  3. Set the API key up in Rstudio

Setting OpenAI API Key

By default, API calls will look for OPENAI_API_KEY environment variable. If you want to set a global environment variable, you can use the following command, where "<APIKEY>" should be replaced with your actual key:

Sys.setenv(OPENAI_API_KEY = "<APIKEY>")

Otherwise, you can add the key to the .Renviron file of the project. The following commands will open .Renviron for editing:

require(usethis)
edit_r_environ(scope = "project")

You can add the following line to .Renviron (again, replace "<APIKEY>" with your actual key):

OPENAI_API_KEY= "<APIKEY>")

This now set the API key every time you start up this particular project. Note: If you are using GitHub/Gitlab, do not forget to add .Renviron to .gitignore!

Usage

Some examples of use.

ChatGPT in RStudio

  1. Addins > GPTSTUDIO > ChatGPT
  2. Type your question.
  3. Click “Chat”
  4. Ask more questions
ChatGPT.example.mov

Provide your own instructions in R, R Markdown, or Quarto files

Addins > GPTSTUDIO > ChatGPT in Source: Apply any edit what YOU desire or can dream up to a selection of code or text.

ChatGPT.in.source.example.mov

Spelling ang grammar check

Addins > GPTSTUDIO > Spelling and Grammar: Takes the selected text sends it to OpenAI’s best model and instructs it to return a spelling and grammar checked version.

spelling

Comment your code:

Addins > GPTSTUDIO > Comment your code: Takes the selected text sends it to OpenAI as a prompt for a code specific model to work with, asks for a version with a comment added explaining the code line by line.

add comments to code

Code of Conduct

Please note that the gptstudio project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

gptstudio's People

Contributors

jameshwade avatar michelnivard avatar ichsan2895 avatar calderonsamuel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.