Video nenà dostupné.
OmlouvĂĄme se.
ChatGPT in RStudio with gptstudio - Better than GitHub Copilot?
VloĆŸit
- Äas pĆidĂĄn 18. 08. 2024
- In this video, I demonstrate how to use large language models like GPT-4 and GPT-3.5-Turbo (aka ChatGPT) to supercharge your R programming workflow. The new R package gptstudio makes it easy to integrate these AI assistants directly inside RStudio for code suggestions, documentation, and more. I show examples of generating plots and code snippets on demand using natural language prompts. Whether you're looking to automate repetitive tasks or get unstuck on complex coding challenges, this package unlocks the power of LLMs for R developers of all skill levels.
đ» {gptstudio} GitHub github.com/mic...
âïž Posit Cloud posit.cloud
đ€ {usethis} usethis.r-lib....
#rstats #rstudio #ai #githubcopilot #openai #gpt3 #gpt4 #huggingface #anthropic #claude #llms #chatbot #shiny #ide #code #programming #copilot
Magnifique đ€©đ€©
You didn't answer the question about whether this RStudio's LLMs integration interface is better than GitHub Copilot.
Copilot gives you suggestions right in the code editor. No need for copy pasting. It therefore feels more natural and the workflow is much less complex. What do you say?
Followed this but didn't work for me unfortunately - no response from prompt and no option for ChatGPT-4 (which I have a subscription for).
hi, hope yo are well, I got up to the stage where gpt is on my viewer section but whenever i write something such as who made ggplot2 there is no response, can you help ?
I have the same issue. Did you get it resolved?
It was great. Thank you
Glad you enjoyed it!
My plan is ChatGPT Plus, the paid gpt4 version. RStudio won't recognize my API Key and I do not see gpt4 as an option.
I have followed all the steps until 5:03 but when I write prompt and send, there is no response. Can you suggest?
The background jobs show:
Background session status: 200, done callr-rs-result-8622e7c5698, NULL, ,
Deleting chat history from this session. , and list(message = "in callr
subprocess.", srcref = NULL, status = 0, stdout = "", stderr = "Deleting chat
history from this session.
", parent_trace = list(parent = c(12, 13, 15, 15,
17, 18, 19, 19, 20, 21, 0, 23), visible = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), namespace = c(NA, NA, "gptstudio", "base",
"gptstudio", "gptstudio", "gptstudio", "gptstudio", "base", "base", "base",
NA), scope = c("", "", ":::", "::", "::", "::", ":::", "::", "::", "::", "::",
"global" ), srcref = list(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL), procsrcref = list(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL), pid = c(2165, 2165, 2165, 2165, 2165, 2165,
2165, 2165, 2165, 2165, 2165, 2165), call =
list("gptstudio::gptstudio_job(skeleton, skill, style, task, custom_prompt)",
c("gptstudio_skeleton_build(skeleton, skill, style, task, custom_prompt) %>% ",
" gptstudio_request_perform() %>% gptstudio_response_process() %>% "),
"save_skeleton(.)", "saveRDS(skeleton, skeleton_file())",
"gptstudio_response_process(.)", "gptstudio_request_perform(.)",
"gptstudio_request_perform.gptstudio_request_openai(.)",
"stream_chat_completion(prompt = messages, model = model)",
"readRDS(streaming_file())", "gzfile(file, \"rb\")",
c(".handleSimpleError(function (e) ", "{"), "h(simpleError(msg, call))")), call
= NULL, procsrcref = NULL, parent = list(message = "cannot open the
connection", call = "gzfile(file, \"rb\")", srcref = NULL, procsrcref = NULL))
Hmm⊠have you added payment information when creating your OpenAI account?
Thanks for trying it out!
it seems this problem happens if you are using Windows. You may try to run a previous version with the code: remotes::install_version("gptstudio", version = "0.2.0")
I try without the payment info. cuz i wanted to know how it works b4. but its not possible to run like that right?@@james-h-wade
Awesome!
mine doesn't load anything. I do have the "hello and welcome to R" in viewer, but once i type anything in the chat doesn't do anything.
Same here
Even if my API was just produces, it does not work....
I've tried to run it locally in Windows 10, did not work. It does start replying and then stops, took a look at the background job and got "Warning: Error in readRDS: error reading from connection"
"h(simpleError(msg, call))")), call = NULL, procsrcref = NULL, parent =
list(message = "cannot open the connection", call = "gzfile(file, mode)",
srcref = NULL, procsrcref = NULL))
Hope this get even more integrated and supported by Posit, one of the showstoppers in using Rstudio in Sagemaker is that cannot compete with VSCode copilot. These new plugin helps to shorten the gap greatly.
Thanks for letting me know. As a temporary fix, you may be able to run streaming set to false. I'll see what we can do with the next release to make that more stable on Windows.
Addins -> ChatGPT and this message "Connection refused". My OPENAI_API_KEY is correct. How to solve it, please? Thanks.
How do you get around the character count with Chat GPT? I've been trying to feed it some of my C# code but because there's so many lines, I can't get around the 4096 character limit. I've tried chunking it up but I would need 7-8 chunks and it's like GPT forgets what I was asking it to do after so many chunks of code. I've also read I could put it on GitHub but I don't want to open source my code like that just to feed GPT the link. Is there anything else I'm not aware of? Thanks in advance.
Doesn't work for me for some strange reason.
Seems great! I will try it out.
Is it possible to run a long list of prompts (from a spreadsheet for example) ? and to save the answer to each prompt in the spreadsheet?
I'd love to hear how it goes. As far as a list of prompts, that's not a feature we have right now. What do you have in mind for that?
â@@james-h-wade I have been using ChatGPT to code survey data (turn occupation text into a ISCO-08 Code).
But its only worth it if i can do thousands in a reasonable ammount of time (i.e. 10k prompts).
Is it posssible to use Free Chat GPT?
Which model are you talking about? You get a free credit with the OpenAI API and a lot of HuggingFace models are free if you want to use those.
I have the free plan and it is not working. I get the error: OPENAI_API_KEY is not valid. What a pity!!
Why I do not see the GPT 4 among the API options for me (I am in Sydney, and do have a paid subscription)? Thanks
Do you see GPT-4 in the models listed on the OpenAI Playground (platform.openai.com/playground)? If you don't, OpenAI should be rolling out access soon. Thanks for trying it out!
I couldnt see GPT-4 in the list of Rstudio in setting section aswell.@@james-h-wade
does this work in RStudio locally?
Yes
Unfortunately useless, no answer from the chat window
it works - i had the same issue at first, add a value/dollar amount of >=5 on your billing - you can't just add a credit card (the free credit thing is prolly from a while ago) i also made sure to uncheck 'autorefill credit' or whatever it's called