Home  >  Article  >  Technology peripherals  >  Inspired by ChatGPT, I completed the chat APP with data in 10 days and answered questions as well as undergraduates.

Inspired by ChatGPT, I completed the chat APP with data in 10 days and answered questions as well as undergraduates.

WBOY
WBOYforward
2023-05-02 23:19:101360browse

Now, you no longer have to feel a headache when faced with a bunch of data! Today we are going to introduce this application, which allows you to chat with your data in English and then get the results!

This application is called RTutor. It calls OpenAI's Davinci (ChatGPT brother model) through the API. It can translate natural language into R scripts and then execute them on the Shiny platform in a few seconds. Generate R Markdown source files and HTML reports internally.

Locally, RTutor provides services in the form of R packages to help users perform preliminary analysis and visualization, and can be used even without R experience. But it will be better if you have R experience, which can save users time by eliminating the process of converting requests to R and directly providing code as a starting point.

Inspired by ChatGPT, I completed the chat APP with data in 10 days and answered questions as well as undergraduates.


  • Project address: https://github.com/gexijin/RTutor
  • Trial address: http://rtutor.ai/

We use mpg Taking the data set as an example, the mpg data set records the manufacturer, model, category, driver and fuel consumption of some cars in the United States in 1999 and 2008.

After understanding some background knowledge, you can talk to RTutor like this and use ggplot2 to create hwy (highway driving fuel consumption) vs. class (vehicle type, such as a two-seater car ) box plot. Color by category. Add jitter. RTutor then generates R language and outputs the result:

Inspired by ChatGPT, I completed the chat APP with data in 10 days and answered questions as well as undergraduates.

RTutor can also explain statistical concepts and help users decide which statistical test to use. It's at the level of an undergrad with a background in statistics and R courses, and the answers are imperfect but helpful.

Inspired by ChatGPT, I completed the chat APP with data in 10 days and answered questions as well as undergraduates.

RTutor can also generate code and even documents based on context:

Inspired by ChatGPT, I completed the chat APP with data in 10 days and answered questions as well as undergraduates.

The project author said: RTutor is completely a spare time project. After he learned about ChatGPT in his spare time, he completed the project in 10 days in his spare time.

Inspired by ChatGPT, I completed the chat APP with data in 10 days and answered questions as well as undergraduates.

Installation

This repository is updated frequently, sometimes several times a day. Therefore, the project author recommends that users reinstall before each use so that they always have the latest version.

library(remotes)install_github("gexijin/RTutor")

Using an API key with RTutor

Get an API key from OpenAI and use it with RTutor. There are several ways to do this.

  • # Once the app launches, click Settings and paste the API key.
  • Save this key as a text file named api_key.txt in your working directory.
  • Create an environment variable named OPEN_API_KEY for Windows, Mac and Linux systems.

Please refer to the original project for more technical details.

The above is the detailed content of Inspired by ChatGPT, I completed the chat APP with data in 10 days and answered questions as well as undergraduates.. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:51cto.com. If there is any infringement, please contact admin@php.cn delete