Adding ChatGPT to RStudio with the GPT Studio add-in package

  Рет қаралды 53,801

Dr Lyndon Walker

Dr Lyndon Walker

Күн бұрын

Пікірлер: 87
@IgnacioAguilarToledo
@IgnacioAguilarToledo 9 ай бұрын
Amazing. Thank you for the video!
@brittanyletendre376
@brittanyletendre376 Жыл бұрын
Hi, this was so informative. Thanks for sharing! I did noticed that my GPTStudio addin options look a bit different. I have "Spelling and grammar", "Comment your code", "ChatGPT", and "ChatGPT in source".... The one I care most about is "write/code from prompt" but I don't seem to have that one. Any advice?
@eduartobando2260
@eduartobando2260 Жыл бұрын
was able to solve the problem. The same happens to me
@peterclint87
@peterclint87 Жыл бұрын
@@eduartobando2260 how did you solve it?
@marcodiluca210
@marcodiluca210 Жыл бұрын
@@peterclint87 ​Hi, did you solve the problem?
@jacobchristensen5442
@jacobchristensen5442 Жыл бұрын
Does anyone have a solution for this issue?
@lizongzhang
@lizongzhang Жыл бұрын
The gptstudio package is published around five moths ago, now its version is updated, so the menu of the gptstudio add in is different with the earlier version.
@flantier-o5y
@flantier-o5y 24 күн бұрын
Hi, does the addin write the code considering the environment (name of the variable, packages already loaded...) ?
@mubangansofu7469
@mubangansofu7469 Жыл бұрын
Very interesting indeed Dr. Walker
@audiophile...
@audiophile... Жыл бұрын
Thank you Dr,this is really amazing
@jacobchristensen5442
@jacobchristensen5442 Жыл бұрын
I am missing the "write/code from prompt" function, when I follow your steps. How do I fix this?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
They have updated and changed the package since I made this video. I am planning on doing an update
@robcarroll449
@robcarroll449 Жыл бұрын
This is amazing, thank you. For the functionality that you showed to work, do we have to use Quarto, or will these tools work in a normal R script?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Yes, it should work with normal scripts too. I showed Quarto just so I could do the write and spell check text as well as writing code.
@robcarroll449
@robcarroll449 Жыл бұрын
Thanks for the quick response!
@robcarroll449
@robcarroll449 Жыл бұрын
@@DrLyndonWalker one follow up question...does this cost anything to use? I see a message where to paraphrase, it is says "default number of tokens per query is 500, which equates to $0.01 per query." Who's getting charged for this?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Very good question and something I should have been clearer about in the video (although I suspect it will change over time so I didn't want to say things that then became wrong). Your free account starts with a certain amount of credit (I think it is something like $14 but that may change).
@Miesjhel2
@Miesjhel2 Жыл бұрын
The free account is 14$ ish, and that would last you ages, but the credits expire after 3 months. I then bought another 100$ for developing the package and haven’t even run trough 2$ since (with reasonably heavy use). Also not it’s not us the package developers charging you but openai, the package is, and will remain, free.
@andrea-mj9ce
@andrea-mj9ce Жыл бұрын
Should `Sys.setenv(OPENAI_API_KEY = "")` be run at every session of RStudio?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Yes, if you haven't set up anything automated you will need to let RStudio know your api key every new session.
@maevep9535
@maevep9535 Жыл бұрын
Hi, I love your add-in. I encountered another problem when I was helping my friend to use this add-in. Everything is going well. However, when I click GPT in source, there are no codes generated for me. Where could those codes go?
@danielwikstromshemer5947
@danielwikstromshemer5947 Жыл бұрын
Same here
@danielwikstromshemer5947
@danielwikstromshemer5947 Жыл бұрын
Clicking on the link instead of copy pasting it solved it for me
@joseoviedo4529
@joseoviedo4529 Жыл бұрын
Hi, are you using the dev/beta version of the gptstudio package or the regular one from CRAN because I am missing the write/code from prompt function. I have S&G, Comment your Code, ChatGPT, and ChatGPT in Source. The ChatGPT function opens a browser window and its not in the viewer pane like yours either. Any help is appreciated. Thanks for posting this video too!
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
When I made the video it wasn't on cran so I think there have been some updates since then.
@jacobchristensen5442
@jacobchristensen5442 Жыл бұрын
Does anyone have a solution for this issue?
@mahmudurTechWheel
@mahmudurTechWheel Жыл бұрын
The Spelling and Grammer function is not working for some reason, but the other chat functions in R are working. Any solution? The error shows the mode can not be identified. ! OpenAI API request failed [404].Error message: The model: `text-davinci-edit-001` does not exist $error $error$message [1] "The model: `text-davinci-edit-001` does not exist" $error$type [1] "invalid_request_error" $error$param NULL
@Raleon96
@Raleon96 Жыл бұрын
Hey, thank you so much for sharing this. I have an issue with executing code. So after I have set up ChatGPT Plugin, I cannot execute code anymore in R. Have you heard of this issue before? Do you have any idea how I can fix this? When I restart R, I can execute code again, but as soon as I set up the API key and use ChatGPT, pressing ENTER is not executing code anymore, I just switch to the next row in R. I am clueless
@jaredbothwell4692
@jaredbothwell4692 Жыл бұрын
I installed this package but found the performance and results underwhelming if not disappointing. At this stage, I'll stick to the web app console.
@jonahzterzulum
@jonahzterzulum Жыл бұрын
Hello Dr. Walker. followed your video religiously on how to get the gptstudio working in my Rstudio but it's not working seems I got stuck on how to go about with the API key stuff. Can you do a more detailed video on how to go about it? Thank you.
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Thanks. This might help: gptforwork.com/set-up/how-to-create-openai-api-key
@fouedhamouda7356
@fouedhamouda7356 Жыл бұрын
thanks you but I got this error, OpenAI API request failed [429].Error message: You exceeded your current quota, please check your plan and billing details. $error $error$message [1] "You exceeded your current quota, please check your plan and billing details."
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
If you aren't on a paid plan then CharGPT only gives you a certain number of credits. You need to log in and check as it sounds like you have used them all.
@maevep9535
@maevep9535 Жыл бұрын
Hi, I got API key not found or is not formatted correctly. How to solve this? I directly copy and paste the key from the open ai website.
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Try copying to a text document first, just to check that you haven't inadvertently copied some invisible characters.
@maevep9535
@maevep9535 Жыл бұрын
@@DrLyndonWalker Thank you! Love this package! Thank you so much!
@LuiggiPsico
@LuiggiPsico Жыл бұрын
I've been experiencing a problem in ser OPENAI_API_KEY. I've got a loop, and all the time it asks for "do you want to set the OPENAI_API_KEY for this session?" Any guess?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
That's a weird one. Is there something somewhere in there that is resetting the session? That's the first thing that comes to mind because usually once you have set your API key you are good until you restart R.
@Jumbotron2000
@Jumbotron2000 Жыл бұрын
Hi Dr Walker. I have installed the Devtools package but I can not install github for some reason? Can you please walk me through the process for this part
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
I have just posted a video on how to install packages. I hope it helps kzbin.info/www/bejne/i4vHdWxqpZqGiLM
@bobdylansmith1
@bobdylansmith1 Жыл бұрын
Hi. Are there character limits? I notice that there seem to be for the input and the output
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
ChatGPT has it's own limits on characters if you are on the free version. I'm not sure if the package adds anything beyond that, hopefully it is in their documentation if it does.
@danielruttloff2570
@danielruttloff2570 Жыл бұрын
Hey Thanks for your work! But it seems that i have a small problem: when i try to accsess the gptstudio addins i always get this error message: API already validated in this session. Fehler: Function selectionGet not found in RStudio. And whatever i try i cannot resolve it.
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
I'm not sure about that error. If you reach out to the package developers on github or Twitter hopefully they can help. I have found them very responsive
@GuoZirui-kv6xs
@GuoZirui-kv6xs Жыл бұрын
hey Lyndon, I have a question about this. i've generated API keys from Open AI and tried to use GPRSTUDIO in R stuio, but it told me "API key not found or is not formatted correctly". Do u know how to solve this? THX
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
The 2 things that come to mind to check are that the key was correctly typed/copied (no phantom spaces if you copy pasted), and that you have quote marks around it.
@enocharthur1955
@enocharthur1955 Жыл бұрын
I got this error: This doesn't seem to work for the free openAI accounts. I got the error below when I tried. "OpenAI API request failed [429].Error message: You exceeded your current quota, please check your plan and billing details. $error $error$message [1] "You exceeded your current quota, please check your plan and billing details." $error$type [1] "insufficient_quota" $error$param NULL $error$code NULL"
@barb5550
@barb5550 Жыл бұрын
Hi, do you know why the answers are different from the GPT’s website? I managed to integrate it into rstudio, but when I ask the same question I get a better R code online than the one I get inside the Rstudio environment
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
You shouldn't expect ChatGPT to give the same answer every time. When testing, I have had it cycle through multiple different answers with the same prompt.
@deluargel
@deluargel Жыл бұрын
Hi, please help me ... gptstudio:::create_gpt_chat() Error in `Encoding
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Hmm, not sure on that one. The package creators have been really responsive via Twitter or github though so hopefully have any easy answer.
@김선정-h9q
@김선정-h9q Жыл бұрын
* installing *source* package 'gptstudio' ... ** using staged installation ** R ** inst ** byte-compile and prepare package for lazy loading Error in file(filename, "r", encoding = encoding) : cannot open the connection Calls: source -> file In addition: Warning message: In file(filename, "r", encoding = encoding) : cannot open file 'renv/activate.R': No such file or directory Execution halted ERROR: lazy loading failed for package 'gptstudio' * removing 'C:/Users/skim/Documents/renv/library/R-4.2/x86_64-w64-mingw32/gptstudio' Can I ask how can I get this fixed?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Check out www.reddit.com/r/Rlanguage/comments/qs4vhk/installed_renv_it_breaks_all_other_packages_and/ or github.com/rstudio/renv/issues/374
@BetsyCohenArg
@BetsyCohenArg Жыл бұрын
I installed and used the add-in for the first time and at the first question it tells me that the quota has already been exceeded :(
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
That's weird. Could be a chatgpt server issue unless you have already used chatgpt on their site a lot.
@siddharthverma7697
@siddharthverma7697 Жыл бұрын
Hi, Lyndon. I am tryimng to set the API key but the studio dosent accept it. it gives me three choices like yes, no and no but when I do yes and paste the key, it does not accept it.
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Are you using the Sys.setenv(OPENAI_API_KEY = "") function? Note that you need the " but is the generated key from openai. There is also a chance that openai servers overwhelmed (can you access chatgpt currently?)
@siddharthverma7697
@siddharthverma7697 Жыл бұрын
@@DrLyndonWalker Yes I can access chat gpt in browser but not in studio
@SergeWich
@SergeWich Жыл бұрын
I do not see that either. Anyone with suggestions on how to get that on a windows machine?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
I think I need to do a new video for the updated interface
@pimvisser3874
@pimvisser3874 Жыл бұрын
Dr Walker. I've followed the complete instructions and the code works up untill I want to install the package from github. During the process I get the following error message: Installing package into ‘C:/Users/redacted/redacted/redacted/R/win-library/4.2’ (as ‘lib’ is unspecified) Error: object 'sk' not found Execution halted I cannot find a specific explanation regarding the object 'sk' error message. Would love to hear if you know how I could proceed.
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Hi there. Check that all of your packages are up to date and devtools is installed. I'm going to post a video in the next day or two showing how to install packages since a few people seem to be struggling.
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
I have just posted a video on how to install packages. I hope it helps kzbin.info/www/bejne/i4vHdWxqpZqGiLM
@pimvisser3874
@pimvisser3874 Жыл бұрын
@@DrLyndonWalker looking at it on Monday. Thanks so much.
@huanjiliu2217
@huanjiliu2217 Жыл бұрын
does it is still working?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
It's been a while since I checked. The developers have always been very responsive, you could try contacting them.
@IrakliKavtaradzepsyche
@IrakliKavtaradzepsyche Жыл бұрын
But can you ask questions just as it is on chatGPT web?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
You probably could on a round about way with the custom request but that's not really the purpose of this.
@IrakliKavtaradzepsyche
@IrakliKavtaradzepsyche Жыл бұрын
@@DrLyndonWalker Actually I just installed the package and it includes chat feature too, but it doesn't work quite good. It's good to use GTP as an assistant to ask questions about the code, not just to generate a code.
@Miesjhel2
@Miesjhel2 Жыл бұрын
You can use the “freeform editor” to edit the code and tell it to “add comments that explain this code to a student” and it will explain code to you. Or add “# explain this code to me:” on top of your code and then use “Write/Code from prompt”.
@alijanbain2852
@alijanbain2852 Жыл бұрын
Thanks for this video! But it doesn't work for me... I had this error message: "API key not found or is not formatted correctly". Could you help me please?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Check that you have correctly copied all of it and that your R code for it is correct. You need to run the R code telling it the API key every new session unless setting up the environment file (which still needs to be called). Worst case, start again with a new API key
@djangoworldwide7925
@djangoworldwide7925 Жыл бұрын
I asked to fit a linear model of mpg by all other numeric variables from the mtcars dataset and it imported panda as pd. OFFENSIVE!
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
Lol. I haven't managed to have that happen. It's interesting how it will generate different responses to the same input.
@jamesleleji6984
@jamesleleji6984 Жыл бұрын
😀
@skyther1010
@skyther1010 Жыл бұрын
@@DrLyndonWalker Does the add-on always ask ChatGPT to output the code in R?
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
@@skyther1010 I think so. It did for me although I didn't look for an option to say produce Python code. The developers are super-responsive on Twitter if you want a definitive answer.
@laraluaces824
@laraluaces824 Жыл бұрын
Why does this warning message occurs? > Sys.setenv(OPENAI_API_KEY = "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") > require(devtools) Lade nötiges Paket: devtools Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : es gibt kein Paket namens ‘devtools’ > install_github("MichelNivard/gptstudio") Error in install_github("MichelNivard/gptstudio") : could not find function "install_github"
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
You need to make sure that the devtools package is installed and loaded.
@andrea-mj9ce
@andrea-mj9ce Жыл бұрын
I get the following error : ! API key has changed. Re-checking API connection. ✔ API key found and matches the expected format. ✔ API key is valid and a simple API call worked. ℹ The API is validated once per session. The default value for number of tokens per query is 500. This equates to approximately $0.01 USD per query. You can increase or decrease the number of tokens with the `gptstudio.max_tokens` option. Here is an example to lower the max tokens to 100 tokens per query: options("gptstudio.max_tokens") = 100 Error in `query_openai_api()`: ! ✖ OpenAI API request failed [429]. ℹ Error message: You exceeded your current quota, please check your plan and billing details. Run `rlang::last_error()` to see where the error occurred.
@DrLyndonWalker
@DrLyndonWalker Жыл бұрын
I haven't seen that one before. I would check your openai account and see how many credits you have (the "free" account is free because they start you off with something like $14 of credits). If you have used it a lot you might have used them all. Second thing I would check is how big of a task you were trying to get it to do - there are limits on the size of jobs. If it doesn't seem like either of these, reach out to the creators on Twitter or via github, they are very responsive.
@bdbj
@bdbj Жыл бұрын
Had the same issue, tried to create a new account and didn't worked also
@andrea-mj9ce
@andrea-mj9ce Жыл бұрын
@@bdbj Yes because you probably signed up with the same phone number
@andrea-mj9ce
@andrea-mj9ce Жыл бұрын
@@bdbj We have used all our free credits probably
@bdbj
@bdbj Жыл бұрын
@@andrea-mj9ce Spot on, tried a new number and worked perfectly, thanks!
ChatGPT in RStudio with gptstudio - Better than GitHub Copilot?
11:33
Симбу закрыли дома?! 🔒 #симба #симбочка #арти
00:41
Симбочка Пимпочка
Рет қаралды 5 МЛН
Confronting Ronaldo
00:21
MrBeast
Рет қаралды 21 МЛН
Exploring AI Research Tools (ChatGPT, Elicit, SciSpace)
16:00
Dr Lyndon Walker
Рет қаралды 54 М.
ChatGPT for Data Analysts | Best Use Cases + Analyzing a Dataset
31:07
Alex The Analyst
Рет қаралды 445 М.
chatGPT test: turn R script into RMarkdown
3:03
EEHolmes-DataScience
Рет қаралды 1,2 М.
20 R Packages You Should Know
30:42
RichardOnData
Рет қаралды 40 М.
OMG: ChatGPT inside RStudio!
10:29
Michel's Science Speedrun
Рет қаралды 18 М.
GitHub Copilot for R - First impressions
24:57
Melissa Van Bussel (ggnot2)
Рет қаралды 10 М.
Rich Iannone || Making Beautiful Tables with {gt} || RStudio
34:05
RTUTOR.AI uses AI to write R code for you
15:37
Dr Lyndon Walker
Рет қаралды 11 М.
ChatGPT for Scientific Research: How to use AI as a Partner in Your Research
17:50
Science Grad School Coach
Рет қаралды 146 М.
How to get CHATGPT in RSTUDIO IDE
3:43
Unboxing Big Data
Рет қаралды 1,6 М.
Симбу закрыли дома?! 🔒 #симба #симбочка #арти
00:41
Симбочка Пимпочка
Рет қаралды 5 МЛН