Skip to content
forked from JBGruber/askgpt

A chat interface build on top of the openai package (which wraps some OpenAI API endpoints).

License

Notifications You must be signed in to change notification settings

textspur/askgpt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

askgpt

The goal of askgpt is to help you to learn R using a ChatGPT-like prompt and answer system. It wraps the openai package and let’s you ask question from the R Console directly.

Installation

You can install the development version of askgpt like so:

remotes::install_github("JBGruber/askgpt")

Then you should get a key for theopenai API on this page. Save it to your project with:

usethis::edit_r_environ(scope = "project")

In the format:

OPENAI_API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Example

askgpt.webm
library(askgpt)
library(askgpt)
log_init() # run to enable error logging
askgpt("What is an R function?")
mean[1]
askgpt("What is wrong with my last command?") # this is a special trigger prompt that sends your last command to GPT
askgpt("Can you help me with the function aes() from ggplot2?")
askgpt("Can you elaborate on that?") # the api does not really have a memory, the last prompt is sent to the API again

About

A chat interface build on top of the openai package (which wraps some OpenAI API endpoints).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%